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
PHPNG kontra HHVM
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Leszek Krupiński
April 20, 2015
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPNG kontra HHVM
Leszek Krupiński
April 20, 2015
More Decks by Leszek Krupiński
See All by Leszek Krupiński
So that the daemon won’t die
leafnode
2
420
Practical PHP7
leafnode
2
510
Dobrze posól swoje hasło
leafnode
0
130
Dobrze posól swoje hasło (z notatkami)
leafnode
0
120
PHPNG kontra HHVM (z notatkami)
leafnode
0
89
Ewolucja PHP: PHP 5.6, NG, PHP 7, HHVM
leafnode
2
310
Sculpin - Generowanie statycznych stron w PHP
leafnode
2
79
Skalowanie aplikacji PHP
leafnode
1
440
Varnish to the Rescue
leafnode
0
140
Other Decks in Programming
See All in Programming
アクセシビリティから考える情報設計
high_g_engineer
0
380
Heart of Swift Concurrency
koher
0
960
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
Agents on Rails - Rails at Scale 2026
irinanazarova
0
180
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
160
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
JRuby: Past, Present, and Future
headius
0
190
The Rails Doctrine Decade
koic
2
340
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
160
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
540
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
220
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
エンジニアに許された特別な時間の終わり
watany
109
250k
Designing for Timeless Needs
cassininazir
1
480
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
Transcript
PHPNG kontra HHVM Leszek Krupiński 4developers 2015
LEAFNODE
None
.pl /PHPersPL +grupy
Teraz
PHP 5.6
Drobne zmiany składniowe
PHP 7
PHP NG
Głęboka refaktoryzacja
Optymalizacja struktur wewnętrznych
Operacje na stosie
Zarządzanie pamięcią
Immutable Array
Efekty
30% lepsze wyniki w testach syntetycznych
20-70% szybsze działanie prawdziwych aplikacji
None
Lies, damned lies, benchmarks
Autor: Dmitry Stogov
Autor: Dmitry Stogov
http://devplant.net/2014/08/11/optimizing-php-code/
Abstract Syntax Tree
LEKSER PARSER / KOMPILATOR URUCHOMIENIE LEKSEMY OPCODE
$y = 5; $y = 5 array[309, ‘$y’, 1] =
array[305, 5, 1] 309 - T_VARIABLE 305 - T_LNUMBER
None
LALR(1) parser Single-pass compiler
[$a, $b, $c] = $array;
LEKSER PARSER / KOMPILATOR URUCHOMIENIE LEKSEMY OPCODE OPCACHE / OPTIMIZER
None
LEKSER PARSER KOMPILATOR URUCHOMIENIE LEKSEMY WĘZŁY AST OPCODE
A = B + C = 1 ; D var
var var var value value value * 2 value products products products sums sums assign assign stmt stmt statements
Usunięcie ograniczeń składniowych
Uruchomienie
Niekompatybilność
ROZSZERZENIA interbase oci8 mssql pdo_oci pdo_dblib sybase_ct
Drobne zmiany w składni
None
HHVM
HipHop for PHP
KOD PHP KOD C KOMPILACJA URUCHOMIENIE
HHVM
KOD PHP BYTECODE JIT COMPILER URUCHOMIENIE
Hack
Return type hinting Member variable types Type-safe collections Generics Type
aliasing Nullable types Tuples Shapes
None
None
None
None
None
XHP
Transpiler
Zgodność HHVM z PHP
Open Source Tests: 95.15% 25 Frameworks at 100% http://hhvm.com/frameworks/
Uruchamianie
HTTP Server PHP FPM Backend class2.php class1.php index.php
HTTP Server HHVM Backend class2.php class1.php index.php
Używać?
1. google.com 2. facebook.com 3. youtube.com 4. yahoo.com 5. baidu.com
6. amazon.com 7. wikipedia.org 8. twitter.com 9. taobao.com 10. qq.com
1. google.com 2. facebook.com 3. youtube.com 4. yahoo.com 5. baidu.com
6. amazon.com 7. wikipedia.org 8. twitter.com 9. taobao.com 10. qq.com
Roadmap 2015 Integracja LLVM Nowe platformy Garbage collector Zarządzanie pamięcią
Wsparcie dla OS X Integracja z Hack typechecker Pliki INI XHP 2.0 w Hack Poprawki zgodności
Fight!
PHPNG/PHP7 + duże community + szeroka baza testowa + perspektywy
(AST) - brak JIT - chaotyczny rozwój
HHVM + wydajność + drop-in zamiast FPM + hack -
zgodność (…ale będzie lepiej) - niewielka baza testowa - duże koszty wdrożenia
Przyszłość
PHP 7
Return type hinting
None
Scalar Type Hints Model hybrydowy
Fatal Exceptions
T_SPACESHIP Because T_PAAMAYIM_NEKUDOTAYIM was not enough.
<=>
Kolejne interpretery
Specyfikacja języka
Czy potrzebne jest wiele interpreterów?
Linki http://bit.ly/phpng-zendcon http://bit.ly/php-ast http://bit.ly/php7timeline https://github.com/php/php-langspec http://bit.ly/hhvm-phpcon2014 https://wiki.php.net/phpng https://wiki.php.net/phpng-int https://wiki.php.net/rfc http://bit.ly/hhvm-etsy
Pytania?
Dziękuję @leafnode http://speakerdeck.com/leafnode/ i zapraszam na mój drugi wykład “Dobrze
posól swoje hasło”, 17:00, Security