Hi Yusuke,

(05/31/2011 01:58 AM), Yusuke ENDOH wrote:
> Still, trunk is 1.5x slower than 1.9.2 because of the object
> generation.
> Each require does the something like this:
> 
>   $LOADED_FEATURES.map {|f| File.expand_path(f) }
> 
> .
> This process creates many objects, i.e., strings.  Typically,
> $LOADED_FEATURES are already expanded, so the process is not
> needed in normal cases.  In fact, 1.9.2 expands the paths only
> when they are not absolute, like this:
> 
>   $LOADED_FEATURES.map {|f| File.expand_path(f) if f is not absolute }


If it's the actual problem, why not cache the expanded path?

https://github.com/shyouhei/ruby/commit/c229cb4