martijn / xsv

High performance, lightweight .xlsx parser for Ruby that provides nothing a CSV parser wouldn't
https://storck.io/posts/announcing-xsv-1-0-0/
MIT License
194 stars 20 forks source link

Optimize for YJIT by using while loops #52

Closed martijn closed 11 months ago

martijn commented 11 months ago

The code introduced in this change is not idiomatic ruby but improves performance in Ruby 3.3-rc1 and without YJIT enabled.

With YJIT the performance gain is about 5%, without YJIT it's 2%. YJIT is generally 15% faster in the basic Xsv benchmark.

For more information, see the code optimization tips in the YJIT docs

shkm commented 11 months ago

Damn, xsv was so idiomatic before.