bolshakov/fear

View on GitHub
benchmarks/fear_pattern_matching_construction_vs_execution.txt

Summary

Maintainability
Test Coverage
# So, it's better to avoid building pattern match in runtime

> bundle exec rake perf:fear:pattern_matching_construction_vs_execution
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
Warming up --------------------------------------
        construction    53.068k i/100ms
           execution   280.541k i/100ms
Calculating -------------------------------------
        construction    537.049k (± 0.2%) i/s -      2.706M in   5.039544s
           execution      2.799M (± 0.4%) i/s -     14.027M in   5.011175s

Comparison:
           execution:  2799195.6 i/s
        construction:   537049.0 i/s - 5.21x  slower