aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2013-04-14 18:20:09 -0500
committerJack Nagel2013-04-14 18:32:48 -0500
commit3c73cc28e0bf12d54f344135b35c5af8feaf0a77 (patch)
tree9f32c2cb1f92eed484b7537bf416639fcf1c8aac /Library/Homebrew/cmd
parent2e58fbf2602b246061df68031d8ee3d1649fc09c (diff)
downloadbrew-3c73cc28e0bf12d54f344135b35c5af8feaf0a77.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/Homebrew/cmd')
0 files changed, 0 insertions, 0 deletions