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
Create libcsv based ruby/csv compatible CSV lib...
Search
秒速284km
May 31, 2018
Programming
0
790
Create libcsv based ruby/csv compatible CSV library
RubyKaigi 2018 - Create libcsv based ruby/csv compatible CSV library
秒速284km
May 31, 2018
Tweet
Share
More Decks by 秒速284km
See All by 秒速284km
fukuoka_ruby_2019
284km
0
190
Rubyアソシエーション開発助成成果報告会
284km
0
2.2k
Charty - Visualize Real-world Data with Ruby
284km
1
2.5k
Charty - Visualizing your data in Ruby
284km
0
2.4k
.so にして色々な言語から便利にのっかろう
284km
0
77
Pragmatic Charty
284km
0
2.4k
Charty with Rails
284km
1
75
Charty (RubyGrant 2018)
284km
0
2.4k
Better CSV processing with Ruby 2.6
284km
0
96
Other Decks in Programming
See All in Programming
CSC305 Lecture 06
javiergs
PRO
0
270
CSC509 Lecture 07
javiergs
PRO
0
240
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
360
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
350
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
360
CSC305 Lecture 09
javiergs
PRO
0
300
AkarengaLT vol.38
hashimoto_kei
1
110
Developer Joy - The New Paradigm
hollycummins
1
350
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
チームの境界をブチ抜いていけ
tokai235
0
210
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
410
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
BBQ
matthewcrist
89
9.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Balancing Empowerment & Direction
lara
5
700
Become a Pro
speakerdeck
PRO
29
5.6k
The Invisible Side of Design
smashingmag
302
51k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
How STYLIGHT went responsive
nonsquared
100
5.8k
Transcript
Create libcsv based ruby/csv compatible CSV library Asakusa.rb @284km
http://rubykaigi.org/2018/parties Talked in the title: “Super fast CSV parser” -
libcsv based - ruby/csv compatible
# libcsv based - fast - standard
# ruby/csv compatible - small && easy to read -
Backward compatibility
## Motivation - CSV is often used - Sometimes I
use a large CSV
## 284km/csv/tree/libcsv ``` # 100,000 lines Comparison: (libcsv) quoted: 81022184
allocated (libcsv) unquoted: 82071384 allocated - 1.01x more unquoted: 110535101 allocated - 1.36x more quoted: 133536546 allocated - 1.65x more ```
## libcsv - columns↑ performance↓ - rows↑ performance➘
## memory usage ``` # 5 columns, 10,000 lines Comparison:
(libcsv) quoted: 8090304 allocated (libcsv) unquoted: 9139504 allocated - 1.13x more unquoted: 11053221 allocated - 1.37x more quoted: 13354666 allocated - 1.65x more ```
## memory usage ``` # 5 columns, 100,000 lines Comparison:
(libcsv) quoted: 81022184 allocated (libcsv) unquoted: 82071384 allocated - 1.01x more unquoted: 110535101 allocated - 1.36x more quoted: 133536546 allocated - 1.65x more ```
## memory usage ``` # 10 columns, 10,000 lines Comparison:
unquoted: 13954361 allocated (libcsv) quoted: 14090304 allocated - 1.01x more (libcsv) unquoted: 15139504 allocated - 1.08x more quoted: 18555121 allocated - 1.33x more ```
## memory usage ``` # 10 columns, 1,000,000 lines Comparison:
unquoted: 1396650961 allocated (libcsv) quoted: 1411636904 allocated - 1.01x more (libcsv) unquoted: 1412686104 allocated - 1.01x more quoted: 1856651721 allocated - 1.33x more ```
# What/How to do after this talk ## Continue development
- libcsv multibyte support - column↑ performance→ - ffi gem replace to fiddle
RubyKaigi 2018 Thank you