connection_pool icon indicating copy to clipboard operation
connection_pool copied to clipboard

[WIP] Add connection pool wrap vs with benchmark

Open ysv opened this issue 5 years ago • 6 comments

Related to https://github.com/mperham/connection_pool/issues/120

Benchmark results On my machine (OSX 10.15.7 on 2,2 GHz 6-Core Intel Core i7) image

image

Conclusion using wrap is ~7% slower than block variant with with method. As for me it doesn't have high impact on performance but still worth mentioning.

If you agree with benchmark results and my conclusion I will add the point in the readme NOTES section

ysv avatar Dec 15 '20 22:12 ysv

@mperham Could you please comment on this ?

ysv avatar Dec 21 '20 18:12 ysv

Great info to have, thanks. Please don’t touch the gemspec, use stdlib only.

mperham avatar Dec 21 '20 18:12 mperham

Can you fix the gemspec so I can merge?

mperham avatar Jan 30 '21 01:01 mperham

Sure I will finalize withing the next week

ysv avatar Jan 30 '21 13:01 ysv

@mperham out of curiosity, what drawback do you see on adding a lib with add_development_dependency in a gemspec ?

BuonOmo avatar May 04 '21 09:05 BuonOmo

It's code for one example benchmark. That's not important enough to justify entry in the gemspec. I think it should look more like:

begin
  gem "benchmark-ips"
  require "benchmark/ips"
rescue LoadError
  puts "Please run `gem install benchmark-ips` before running benchmarks"
end

mperham avatar May 04 '21 14:05 mperham