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
840
0
Share
Create libcsv based ruby/csv compatible CSV library
RubyKaigi 2018 - Create libcsv based ruby/csv compatible CSV library
秒速284km
May 31, 2018
More Decks by 秒速284km
See All by 秒速284km
fukuoka_ruby_2019
284km
0
210
Rubyアソシエーション開発助成成果報告会
284km
0
2.4k
Charty - Visualize Real-world Data with Ruby
284km
1
2.7k
Charty - Visualizing your data in Ruby
284km
0
2.5k
.so にして色々な言語から便利にのっかろう
284km
0
100
Pragmatic Charty
284km
0
2.5k
Charty with Rails
284km
1
110
Charty (RubyGrant 2018)
284km
0
2.6k
Better CSV processing with Ruby 2.6
284km
0
120
Other Decks in Programming
See All in Programming
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
130
Making the RBS Parser Faster
soutaro
0
680
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.9k
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
AgentCore Optimizationを始めよう!
licux
3
230
Building on Bluesky's AT Protocol with Ruby
mackuba
0
110
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
340
cloudnative conference 2026 flyle
azihsoyn
0
160
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
340
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
580
How to Talk to Developers About Accessibility
jct
2
190
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
170
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
300
How STYLIGHT went responsive
nonsquared
100
6.1k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
130
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
150
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
54k
The Cult of Friendly URLs
andyhume
79
6.9k
Are puppies a ranking factor?
jonoalderson
1
3.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
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