Skip to content

Instantly share code, notes, and snippets.

@sclinede
Created October 3, 2014 08:58
Show Gist options
  • Save sclinede/47955faaa21255c47310 to your computer and use it in GitHub Desktop.
Save sclinede/47955faaa21255c47310 to your computer and use it in GitHub Desktop.
c1 = Company.find(10740942)
c2 = Company.find(10809508)
Benchmark.measure do
RebindProductRegions.new(c2).add_regions_new([149, 256], 5000)
end
=> ... in progress ...
## 79.190000 0.270000 79.460000 (150.049631) - without Sphinx :( ##
Benchmark.measure do
RebindProductRegions.new(c1).add_regions([143, 256])
end
=> ... in progress ...
Benchmark.bm do |x|
x.report("Old Rebind") { RebindProductRegions.new(c1).add_regions([143, 256]) }
x.report("New Rebind") { RebindProductRegions.new(c2).add_regions_new([123, 256], 5000) }
end
RebindProductRegions.new(c1).add_regions([146, 256])
RebindProductRegions.new(c2).add_regions_new([146, 256])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment