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
As fast as C?
Search
Felix Geisendörfer
June 27, 2012
Programming
0
460
As fast as C?
Talk given at the London Node.js User Group.
Felix Geisendörfer
June 27, 2012
Tweet
Share
More Decks by Felix Geisendörfer
See All by Felix Geisendörfer
tus.io - Resumable File Uploads (Lightning Talk)
felixge
2
810
Programming flying robots with JavaScript
felixge
2
990
Programming flying robots with JavaScript
felixge
0
640
Programming an AR Drone Firmware with JS (de)
felixge
1
640
Faster than C?
felixge
1
1.3k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
520
Faster than C?
felixge
1
690
The power of node.js (with quadcopters)
felixge
0
530
Faster than C?
felixge
0
460
Other Decks in Programming
See All in Programming
浮動小数の比較について
kishikawakatsumi
0
380
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
160
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
920
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
130
SourceGeneratorのマーカー属性問題について
htkym
0
140
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
150
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
Python’s True Superpower
hynek
0
200
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Accessibility Awareness
sabderemane
0
73
Embracing the Ebb and Flow
colly
88
5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Balancing Empowerment & Direction
lara
5
930
Building Adaptive Systems
keathley
44
2.9k
Skip the Path - Find Your Career Trail
mkilby
1
72
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
370
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
80
Between Models and Reality
mayunak
2
230
Leo the Paperboy
mayatellez
4
1.5k
Designing for Performance
lara
611
70k
Transcript
As fast as C? Writing high performance stream parsers in
JS. Felix Geisendörfer June 27, 2012 - London Node.js User Group
Thanks Forward!
Felix Geisendörfer
(@)felixge(.de)
core contributor
transloadit.com
~50 npm modules
node-formidable
node-mysql
Parser Geeks?
As fast as C?
Dubious Benchmarks Ahead!
Selecting 100k blog post rows
None
None
0 15000 30000 45000 60000 node-mysql-0.9.6 node-mysql-libmysqlclient-1.3.3 node-mysql-2.0.0-alpha3 53966 36429
20968 Rows per Second node-mysql-0.9.6 node-mysql-libmysqlclient-1.3.3 node-mysql-2.0.0-alpha3 https://github.com/felixge/mysql-client-benchmarks
0 17500 35000 52500 70000 node-mysql-0.9.6 node-mysql-libmysqlclient-1.3.3 node-mysql-2.0.0-alpha3 php-mysqlnd-5.13 68097
53966 36429 20968 Rows per Second node-mysql-0.9.6 node-mysql-libmysqlclient-1.3.3 node-mysql-2.0.0-alpha3 php-mysqlnd-5.13 https://github.com/felixge/mysql-client-benchmarks
Pure node.js parsers can compete with C Addons
Lessons Learned
Practice
Benchmark First
Buffering can be good!
Code!
it
Sponsors
They’re hiring! @dan_jenkins
Also hiring!
Questions? ” http://felixge.de/
[email protected]
@felixge
Algorithms
------------------------------4a62195680a6 Content-Disposition: form-data; name="upload1"; filename="file1.txt" Content-Type: text/plain file 1 data
... ------------------------------4a62195680a6 Content-Disposition: form-data; name="upload2"; filename="file2.txt" Content-Type: text/plain file 2 data ... ------------------------------4a62195680a6-- Example: Multipart (File Uploads)
Lots and lots of file data ... ------------------------------4a62195680a6 Naive Boundary
Search: One byte at a time