Closed ysv closed 2 years ago
@mperham Could you please comment on this ?
Great info to have, thanks. Please don’t touch the gemspec, use stdlib only.
Can you fix the gemspec so I can merge?
Sure I will finalize withing the next week
@mperham out of curiosity, what drawback do you see on adding a lib with add_development_dependency
in a gemspec ?
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
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)
Conclusion using
wrap
is ~7% slower than block variant withwith
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