5 links
tagged with all of: performance + ruby
Click any tag below to further narrow down your results
Links
The article discusses the challenges of using regular expressions for data extraction in Ruby, particularly highlighting the performance issues with the default Onigmo engine. It compares alternative regex engines like re2, rust/regex, and pcre2, presenting benchmark results that demonstrate the superior speed of rust/regex, especially in handling various text cases and complexities.
The author shares improvements made to the P2 HTML templating library for Ruby, enhancing its template generation performance significantly. By utilizing a new compilation technique and implementing several optimizations, P2 now outperforms traditional Ruby templating methods like ERB. The article details the technical processes behind these enhancements and the resulting performance benchmarks.
OSV is a high-performance CSV parser for Ruby, built using Rust, and offers both hash-based and array-based row formats. It provides significant speed advantages over the standard Ruby CSV library and other CSV gems, especially when using the array-based mode. Users can easily integrate OSV into their applications by adding it to their Gemfile or installing it directly via gem install.
Open source, particularly in the Ruby ecosystem, faces fragility due to underfunding and reliance on a few major contributors like Shopify, which has significant influence over Ruby and Rails. Despite these challenges, open source remains resilient as it adapts to new demands, and companies should invest in maintaining and improving the frameworks they depend on to enhance performance and stability.
Ruby's JIT compiler, specifically ZJIT, enhances performance by compiling frequently used methods into native code while retaining their bytecode for safety and de-optimization. The article explains the mechanics of how Ruby executes JIT-compiled code, the criteria for compilation, and the reasons for falling back to the interpreter when assumptions are violated. Additionally, it addresses common questions regarding JIT functionality and performance implications.