Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Create libcsv based ruby/csv compatible CSV lib...

Create libcsv based ruby/csv compatible CSV library

RubyKaigi 2018 - Create libcsv based ruby/csv compatible CSV library

秒速284km

May 31, 2018
Tweet

More Decks by 秒速284km

Other Decks in Programming

Transcript

  1. ## 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 ```
  2. ## 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 ```
  3. ## 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 ```
  4. ## 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 ```
  5. ## 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 ```
  6. # What/How to do after this talk ## Continue development

    - libcsv multibyte support - column↑ performance→ - ffi gem replace to fiddle