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
Transcript
21 slides
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&$
More Decks by Naoki Kishida
See All by Naoki Kishida
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
590
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
250
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
920
Java 27新機能 / Java 27 new features
kishida
2
270
ローカル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.6k
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
460
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
5.8k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
310
Other Decks in Technology
See All in Technology
設計手法を「道具」として使いこなすために
a_suenami
6
1.1k
LLM 基盤と kagent v0 を全部 k8s に入れてみた / Deploy both LLM and kagent v0 in k8s
kota2and3kan
0
240
Amazon Bedrock AgentCore の基礎とセキュリティ・ガバナンス
ren8k
0
150
MCPでネットワーク障害調査を自動化する前に直すべき3つのこと
yama3133
1
630
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
720
AWS Emulator を評価する: 手元で動く AWS の API の仕組み、始め方、確かめ方
inariku
PRO
2
770
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
3
370
エンタープライズ事業未経験のデータ屋、 AI時代にN回撃沈する.pdf
ryoskdara_
0
150
SREのためのFinOps入門
muziyoshiz
3
1.6k
会社説明資料_最新版
demaecan
0
32k
未来を描き変化の中で学び直す ヴァンガードから考える、AI時代のチーム開発
lamb_moko
0
100
re:Inventを楽しむために、 1日1つ「これが楽しみ」を決めよう
beli68
0
120
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
1k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
490
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
670
Fireside Chat
paigeccino
43
4.1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Navigating Weather and Climate Data
rabernat
0
590