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
Strike - Yet Another Fast PHP Router -
Search
gourrymk2
July 31, 2014
Programming
170
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Strike - Yet Another Fast PHP Router -
gourrymk2
July 31, 2014
Other Decks in Programming
See All in Programming
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
210
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
APNsからLive Activityを開始する話
yumnumm
0
170
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
410
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
360
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
The World Runs on Bad Software
bkeepers
PRO
72
12k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Test your architecture with Archunit
thirion
2
2.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
How to Talk to Developers About Accessibility
jct
2
580
So, you think you're a good person
axbom
PRO
2
2.2k
Transcript
Strike Yet Another Fast PHP Router By Leo
Leo 寸永來 Work at S.M.S. Taiwan 知恩思資訊股份有限公司 Senior PHP Developer
Joomla! 3 / Symfony2 / Doctrine2 / Silex / Node.js GitHub: https://github.com/LeoOnTheEarth
1. What is Strike? 2. How router works 3. Performance
What is Strike?
1. A pure router library (require zero dependency) 2. Easy
to use 3. Fast enough 4. https://github.com/LeoOnTheEarth/Strike What is Strike?
Install with composer Strike Installation
Route Collecting
Route Matching
Matched Route Format
Generate URL
StrikeAcceslerator Install with composer
StrikeAcceslerator Usage
StrikeAcceslerator Usage StrikeAccelerator with APC cache
How Router Works Collect Patterns ↓ Compile Patterns ↓ Match
Path
How Router Works Collect Patterns ↓ Compile Patterns ↓ Match
Path CACHE
How Pux Works
How Symfony Works
How Strike Works /blog/article/{id}/{title}
How Strike Works Pattern: /blog/article/{id}/{title} URL path: /blog/article/123/title-balabala
How Strike Works
How Strike Works
How Strike Works / /blog/article/{id}/{title} /blog/article/archives/{year}/{month}/{day} /blog/articles /news
More complex mapping
Optimized mapping (Will implement later) After I figured out this
implementation, I found it is similar to Symfony.
Performance Comparing Strike dev-master StrikeAccelerator dev-master Pux v1.5 Symfony2 v2.5.2
Benchmark Environment Linode instance • 2 GB RAM • 2
CPU Cores • SSD Storage • CentOS 6.5 • PHP 5.4.30 • Added 18 patterns Match pattern: “/blog/article/{id}/{title}” Match path: “/blog/article/345/router-benchmarks” Source code: https://github.com/LeoOnTheEarth/StrikeBenchmark
Benchmark Results Run 10000 times in console without cache (less
is better) Total Match 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 Strike Pux Symfony response time (ms)
Total Match 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
0.4 0.45 0.5 Strike-cache Pux-cache Symfony-cache response time (ms) Benchmark Results Run 10000 times in console with cache (less is better)
Benchmark Results Apache Benchmark Test without cache (more is better)
ab -c 10 -n 100 ab -c 10 -n 500 ab -c 50 -n 500 ab -c 100 -n 500 0 100 200 300 400 500 600 700 Apache benchmark result (without cache) Strike Pux Symfony Requests per second
Benchmark Results Apache Benchmark Test with cache (more is better)
ab -c 10 -n 100 ab -c 10 -n 500 ab -c 50 -n 500 ab -c 100 -n 500 0 100 200 300 400 500 600 700 800 Apache benchmark result (with cache) Strike-cache Pux-cache Symfony-cache Requests per second
Benchmark Summary 1. Pux performance is quiet awesome. 2. Router
match is not a performance issue, it's fast enough 3. We should focus on the performance during router initialization
Strike will continue enhance it's performance Feel free to send
feedback on GitHub https://github.com/LeoOnTheEarth/Strike
Thanks For Your Listening Any Questions?