fork download
  1. require 'benchmark'
  2.  
  3. puts Benchmark.measure { (1..100_000).each { |i| "HDMI_CEC_CEC".split("_")}}
  4. puts Benchmark.measure { (1..100_000).each { |i| "HDMI_CEC_CEC".scan(/[^_]+/)}}
  5.  
Success #stdin #stdout 0.61s 7600KB
stdin
Standard input is empty
stdout
  0.150000   0.000000   0.150000 (  0.150263)
  0.440000   0.000000   0.440000 (  0.447936)