Improving CVAR performance in Ruby 3.1

Performance Improvement