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
420
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
780
Programming flying robots with JavaScript
felixge
2
960
Programming flying robots with JavaScript
felixge
0
600
Programming an AR Drone Firmware with JS (de)
felixge
1
620
Faster than C?
felixge
1
1.2k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
490
Faster than C?
felixge
1
640
The power of node.js (with quadcopters)
felixge
0
500
Faster than C?
felixge
0
420
Other Decks in Programming
See All in Programming
DataformでPythonする / dataform-de-python
snhryt
0
150
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
160
Jakarta EE Meets AI
ivargrimstad
0
570
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
920
Amazon Q CLI開発で学んだAIコーディングツールの使い方
licux
3
170
Go製CLIツールをnpmで配布するには
syumai
2
1.1k
Terraform やるなら公式スタイルガイドを読もう 〜重要項目 10選〜
hiyanger
11
2.8k
中級グラフィックス入門~効率的なメッシュレット描画~
projectasura
4
2.4k
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
660
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
21
10k
商品比較サービス「マイベスト」における パーソナライズレコメンドの第一歩
ucchiii43
0
260
202507_ADKで始めるエージェント開発の基本 〜デモを通じて紹介〜(奥田りさ)The Basics of Agent Development with ADK — A Demo-Focused Introduction
risatube
PRO
6
1.4k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Why Our Code Smells
bkeepers
PRO
337
57k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Into the Great Unknown - MozCon
thekraken
40
2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.5k
Optimizing for Happiness
mojombo
379
70k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
420
How GitHub (no longer) Works
holman
314
140k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
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