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.5k
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
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
410
Java Webフレームワークの現状 / java web framework
kishida
10
10k
Is Object Oriented nesessary? COSCUP 2024
kishida
0
140
プログラムに組み込みたい人向けLLMの概要 / LLM for programmers
kishida
3
490
Javaの現状2024夏 / Java current status 2024 summer
kishida
5
1.9k
Java 22 Overview
kishida
1
330
Is Object-Oriented nessesary?
kishida
0
110
オブジェクト指向は必要なのか / Is object-oriented needed?
kishida
36
25k
AI時代を乗り切る実装力をつけよう / Get avility of implementation beyond AI era
kishida
4
7.7k
Other Decks in Technology
See All in Technology
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.5k
コンテナセキュリティのためのLandlock入門
nullpo_head
2
330
20241220_S3 tablesの使い方を検証してみた
handy
4
710
「完全に理解したTalk」完全に理解した
segavvy
1
160
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
組み込みアプリパフォーマンス格闘記 検索画面編
wataruhigasi
1
180
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
410
Yahoo! ズバトクにおけるフロントエンド開発
lycorptech_jp
PRO
0
110
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
120
生成AIのガバナンスの全体像と現実解
fnifni
1
230
Qiita埋め込み用スライド
naoki_0531
0
5.3k
DUSt3R, MASt3R, MASt3R-SfM にみる3D基盤モデル
spatial_ai_network
2
330
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
530
Agile that works and the tools we love
rasmusluckow
328
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
How to Ace a Technical Interview
jacobian
276
23k
Typedesign – Prime Four
hannesfritz
40
2.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Statistics for Hackers
jakevdp
796
220k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
96
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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&$