Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TruffleでPHPぽい言語を実装したら爆速だった話 / truffle php at jj...
Search
Naoki Kishida
February 27, 2019
Technology
2.8k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TruffleでPHPぽい言語を実装したら爆速だった話 / truffle php at jjug night seminar
TruffleでPHPを実装したら爆速だった話です
Naoki Kishida
February 27, 2019
More Decks by Naoki Kishida
See All by Naoki Kishida
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Java 27新機能 / Java 27 new features
kishida
2
230
ローカルLLMでどこまでコードが書けるか -LLM基礎知識 / How much code can be written on a local LLM - fundamental knowledge
kishida
10
11k
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.5k
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
430
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
5.7k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
290
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
660
Other Decks in Technology
See All in Technology
大型犬好きによるPugの紹介
yamanoku
1
160
USB PDを使ってスマホを労わりたい
raspython3
0
180
go-sqletch
moznion
0
140
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
5k
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
140
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
160
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
Refining Active Record
shugo
0
160
夫婦で子育てするための育児標準化
codmoninc
PRO
0
360
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Building AI with AI
inesmontani
PRO
1
1.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
WCS-LA-2024
lcolladotor
0
890
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
How to Ace a Technical Interview
jacobian
280
24k
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Transcript
TrufflePHP JJUG 2019/2/27 LINE Fukuoka
• • LINE Fukuoka •
• @kis
Truffle •
Truffle • ()
Truffle
PHP • jparsec ( ) • https://github.com/jparsec/jparsec/ •
• +-<>.( ) • • • if • echo https://github.com/kishida/phpparser
<?php function fib($n) { if ($n
< 2) { return $n; } return fib($n - 1) + fib($n - 2); } echo "fib:".fib(31); echo "¥n";
(1/6) • Node
(2/6) • • (Specialization)
(3/6) • CallNode
(4/6) •
(5/6) • NodeDirectCallNodeCompilerAssertsGraal • Java
(6/6) • 5; • 0:, 4 %)5210:, 69; •
return=-2/ goto(JVM%)) jmp(*!' +) ReturnException #+&"$(87 resultObject <3.
<?php function fib($n) { if ($n < 2) {
return $n; } return fib($n - 1) + fib($n - 2); } $start = microtime(1); echo "fib:".fib(31); echo "¥n"; echo "time:".(microtime(1) - $start); echo "¥n"; fib(31);fib(31);fib(31);fib(31);fib(31); $start = microtime(1); echo "fib:".fib(31); echo "¥n"; echo "time:".(microtime(1) - $start); echo "¥n";
• (interpreter) on JDK 11 • Truffle
JDK 11 • Truffle GraalVM CE • Truffle GraalVM CE • Truffle GraalVM EE • Truffle GraalVM EE • PHP 5.6 • PHP 7.3
(JIT) • PHP 7.3PHP5.63 • PHP7.37 • Truffle+GraalVM
CEPHP7.3 • Truffle+GraalVM EEPHP7.32 • GraalVM CE PHP7.32 • GraalVM EE PHP7.34
• JIT • •
• EE PHP7.3 • CE PHP7.3
• PHP # &!"' • %
• • EE$CE% <?php function fib($n) { if ($n < 2) { return $n; } return fib($n - 1) + fib($n - 2); } echo "fib:".fib(31); echo "¥n";
• Real$) "UserCPU! " • JVMUser" ' •
( CPU" ' • GraalVMRealUser & • Graal#% ( CPU"
• PHPPHP3PHP4PHP5PHP7 '5# !"(PHP6&8) • (0, +*:% PHP7941
• "$!(03 • . '5# (0,6 -2 • 5/$7)#(Specialization)
• GraalVM • Truffle • "
# SimpleLanguage • Writing a Language in Truffle • gitter ! % • Graal&$