aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/plotutils.rb
diff options
context:
space:
mode:
authorJack Nagel2013-04-14 18:20:09 -0500
committerJack Nagel2013-04-14 18:32:48 -0500
commit04b400ef9a0837806680b04f9d5924101c680371 (patch)
tree54cf1d134ae40ee146bd4f31571c5314096faa30 /Library/Formula/plotutils.rb
parent90b70fd8a111afe450b5f9ec74b997a5efa0586d (diff)
downloadhomebrew-04b400ef9a0837806680b04f9d5924101c680371.tar.bz2
Optimization: avoid repeated interpolation in regexp
Benchmark.bm do |b| b.report("before") do 100_000.times { /(\.#{MacOS.cat}\.bottle\.(\d+\.)?tar\.gz)$/ } end b.report("after ") do 100_000.times { /(\.#{MacOS.cat}\.bottle\.(\d+\.)?tar\.gz)$/o } end end user system total real before 35.400000 0.140000 35.540000 ( 35.619674) after 0.020000 0.000000 0.020000 ( 0.016662)
Diffstat (limited to 'Library/Formula/plotutils.rb')
0 files changed, 0 insertions, 0 deletions