Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Create libcsv based ruby/csv compatible CSV lib...
Search
秒速284km
May 31, 2018
Programming
880
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Create libcsv based ruby/csv compatible CSV library
RubyKaigi 2018 - Create libcsv based ruby/csv compatible CSV library
秒速284km
May 31, 2018
Transcript
13 slides
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
More Decks by 秒速284km
See All by 秒速284km
fukuoka_ruby_2019
284km
0
220
Rubyアソシエーション開発助成成果報告会
284km
0
2.6k
Charty - Visualize Real-world Data with Ruby
284km
1
2.9k
Charty - Visualizing your data in Ruby
284km
0
2.8k
.so にして色々な言語から便利にのっかろう
284km
0
120
Pragmatic Charty
284km
0
2.7k
Charty with Rails
284km
1
110
Charty (RubyGrant 2018)
284km
0
2.8k
Better CSV processing with Ruby 2.6
284km
0
130
Other Decks in Programming
See All in Programming
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
Next.js: The final boss of Web Performance
guaca
0
400
AI-Powered Domain-Driven Design
ziobrando
0
440
Performance Optimization With LLMs
xleitix
0
260
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
340
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
340
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
Getting Started with Vibe Coding
miccheng
0
220
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
A Soul's Torment
seathinner
9
3.9k
Designing for Performance
lara
612
70k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Amusing Abliteration
ianozsvald
1
390
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Deep Space Network (abreviated)
tonyrice
0
410
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
For a Future-Friendly Web
brad_frost
184
11k