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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
秒速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.6k
.so にして色々な言語から便利にのっかろう
284km
0
110
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
OSもどきOS
arkw
0
350
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
140
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
130
3Dシーンの圧縮
fadis
1
540
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
400
色即是空、空即是色、データサイエンス
kamoneggi
1
240
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
11k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
240
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
990
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
140
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
340
Information Architects: The Missing Link in Design Systems
soysaucechin
0
950
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
The agentic SEO stack - context over prompts
schlessera
0
790
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
We Have a Design System, Now What?
morganepeng
55
8.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
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