Benchmarking Ruby Parsers · On the Edge of Ruby
30-Oct-2024 71
The new Prism parser has become the default in Ruby 3.4.0 preview 2.
Let’s benchmark Ruby parsers and find out how fast they are.
We run benchmarks on Ruby 3.4.0 preview 2 with YJIT (ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +YJIT +PRISM [x86_64-linux]), on an AMD Ryzen 7 3700X 8-Core Processor and a NVMe M.2 SSD, on Linux, with frequency scaling disabled and the performance CPU governor.
We will compare:
prism 1.2.0
parser 3.3.5.0
ruby_parser 3.21.1
Ripper from ruby 3.4.0preview2
RubyVM::AbstractSyntaxTree from ruby 3.4.0preview2
Which are the latest releases at the time of writing.
Benchmarking Ruby Parsers · On the Edge of Ruby #ruby #rubydeveloper #rubyonrails #Benchmarking #Parsers #benchmarking https://rubyonrails.ba/link/benchmarking-ruby-parsers-on-the-edge-of-ruby