Benchmarking Ruby Parsers · On the Edge of Ruby

30-Oct-2024 141
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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle