Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TruffleでPHPぽい言語を実装したら爆速だった話 / truffle php at jj...
Search
Naoki Kishida
February 27, 2019
Technology
3
2.6k
TruffleでPHPぽい言語を実装したら爆速だった話 / truffle php at jjug night seminar
TruffleでPHPを実装したら爆速だった話です
Naoki Kishida
February 27, 2019
Tweet
Share
More Decks by Naoki Kishida
See All by Naoki Kishida
LLMベースAIの基本 / basics of LLM based AI
kishida
12
3.1k
Java 24まとめ / Java 24 summary
kishida
3
630
AI時代のプログラミング教育 / programming education in ai era
kishida
25
26k
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
10
2.5k
AI時代に求められるプログラマの能力 / ability of programmer in AI era
kishida
19
13k
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
530
Java Webフレームワークの現状 / java web framework
kishida
10
11k
Is Object Oriented nesessary? COSCUP 2024
kishida
0
200
プログラムに組み込みたい人向けLLMの概要 / LLM for programmers
kishida
3
780
Other Decks in Technology
See All in Technology
怖くない!はじめてのClaude Code
shinya337
0
350
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
4
210
モバイル界のMCPを考える
naoto33
0
400
「クラウドコスト絶対削減」を支える技術—FinOpsを超えた徹底的なクラウドコスト削減の実践論
delta_tech
4
120
Delta airlines®️ USA Contact Numbers: Complete 2025 Support Guide
airtravelguide
0
230
生成AI時代の開発組織・技術・プロセス 〜 ログラスの挑戦と考察 〜
itohiro73
1
410
AWS認定を取る中で感じたこと
siromi
1
160
Model Mondays S2E03: SLMs & Reasoning
nitya
0
330
Core Audio tapを使ったリアルタイム音声処理のお話
yuta0306
0
170
mrubyと micro-ROSが繋ぐロボットの世界
kishima
3
400
Lambda Web Adapterについて自分なりに理解してみた
smt7174
5
150
Geminiとv0による高速プロトタイピング
shinya337
0
220
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1031
460k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
4 Signs Your Business is Dying
shpigford
184
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Code Review Best Practice
trishagee
69
18k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Code Reviewing Like a Champion
maltzj
524
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
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&$