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
750
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
140
Rubyアソシエーション開発助成成果報告会
284km
0
2k
Charty - Visualize Real-world Data with Ruby
284km
1
2.2k
Charty - Visualizing your data in Ruby
284km
0
2.1k
.so にして色々な言語から便利にのっかろう
284km
0
45
Pragmatic Charty
284km
0
2.1k
Charty with Rails
284km
1
40
Charty (RubyGrant 2018)
284km
0
2.1k
Better CSV processing with Ruby 2.6
284km
0
65
Other Decks in Programming
See All in Programming
php-conference-japan-2024
tasuku43
0
320
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
良いユニットテストを書こう
mototakatsu
8
2.8k
useSyncExternalStoreを使いまくる
ssssota
6
1.2k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
140
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
140
Security_for_introducing_eBPF
kentatada
0
110
MCP with Cloudflare Workers
yusukebe
2
220
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
140
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
500
Featured
See All Featured
Code Review Best Practice
trishagee
65
17k
Agile that works and the tools we love
rasmusluckow
328
21k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Mobile First: as difficult as doing things right
swwweet
222
9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
We Have a Design System, Now What?
morganepeng
51
7.3k
Adopting Sorbet at Scale
ufuk
73
9.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Code Reviewing Like a Champion
maltzj
520
39k
The Cost Of JavaScript in 2023
addyosmani
45
7k
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