Actions
Feature #12639
openSpeed up require in RubyGems by 5x
Description
This patch makes requiring an already-loaded file approximated 5x faster when the RubyGems mixin for require is present.
Benchmarked via the following script:
require "rubygems"
require "benchmark/ips"
Benchmark.ips do |x|
x.report("ruby") { gem_original_require "rubygems" }
x.report("rubygems") { require "rubygems" }
x.compare!
end
I understand that it's not ideal to add new global functions, and I'd appreciate guidance on where else I could expose this functionality to ruby code.
Thanks :)
Files
Actions
Like0
Like0Like0