From: Nikolai Weibull Date: 2011-11-01T16:03:57+09:00 Subject: [ruby-core:40616] Re: [ruby-trunk - Feature #5427] Not complex patch to improve `require` time (load.c) On Tue, Nov 1, 2011 at 07:35, Yura Sokolov wrote: > > Issue #5427 has been updated by Yura Sokolov. > > >> Slower than what? require_relative is a lot faster than require > > Sorry, you are right, I confused `require_relative 'somelib'` with `require './somelib'`. > `require_relative` still gains improvement from this patch, cause it use `require`, but improvement is a bit lesser cause prepended path allows to skip some checks here http://redmine.ruby-lang.org/projects/ruby-trunk/repository/entry/load.c#L158 I don���t think Thomas was talking about speed change in require_relative thanks to your suggested changes, rather that one should use require_relative regardless of your patch, as require_relative is a lot faster.