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
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
As fast as C?
Talk given at the London Node.js User Group.
Felix Geisendörfer
June 27, 2012
More Decks by Felix Geisendörfer
See All by Felix Geisendörfer
tus.io - Resumable File Uploads (Lightning Talk)
felixge
2
850
Programming flying robots with JavaScript
felixge
2
1k
Programming flying robots with JavaScript
felixge
0
660
Programming an AR Drone Firmware with JS (de)
felixge
1
670
Faster than C?
felixge
1
1.3k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
560
Faster than C?
felixge
1
710
The power of node.js (with quadcopters)
felixge
0
550
Faster than C?
felixge
0
490
Other Decks in Programming
See All in Programming
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
500
ALB ログから Trace を気合で繋げる技術
fohte
2
200
メールのエイリアス機能を履き違えない
isshinfunada
0
250
MySQLとPostgreSQLって何が違うの?
akagami
0
130
My Marp Sample
sinoue0108
0
120
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
1
420
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
300
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
730
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1k
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
1
2k
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
GraphQLとの向き合い方2022年版
quramy
50
15k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
360
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
420
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
310
Build your cross-platform service in a week with App Engine
jlugia
234
19k
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