>> Require performance has been imporved a little at r31875, i think.
>
> nice! It sure has.
>
>> Please compare the proposal with it
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mine =A0 =A01.9.3r31923
> 2000 in load path =A0 =A0 =A0 0.70 =A0 =A00.702834
> 2500 requires =A0 =A0 =A0 =A0 =A0 0.29 =A0 =A05.676016
> new rails app =A0 =A0 =A0 =A0 =A0 1.08 =A0 =A01.346
> medium rails app =A0 =A0 =A0 =A010.49 =A0 10.88
>
> The underlying algorithm is still problematic (see 2500 requires benchmar=
k),
> but I don't have strong evidence that it is affecting performance of real
> apps given it appears to perform well on rails applications. Assuming no
> contrary evidence appears, and without understanding this difference
> further, you probably won't want to apply my patch for a 1.9.3 point rele=
ase
> given the risk of regressions. I still think it should be given
> consideration for a future major release though.

Thank you for benchmarking. ( I don't have rails benchmarks. )
It is good news that it's effective enough for rails.

I think that your idea is good, and heard Hash is already used in JRuby.
But your patch is large and has some compatibility issue,
so I'm afraid for reject at 1.9.3.


> Out of interest ... how does your commit work? Is it an optimization perh=
aps
> my patch could benefit from? My concern with r31875 is that it makes that
> loop even harder to understand for those not as familiar with that part o=
f
> the code.

In loaded_feature_path and outer of it,
it takes the match LOADED_FEATURE and LOAD_PATH+target in each of
LOADED_FEATURES and LOAD_PATH array for back compatibility ( i think ) .
before patch, part of matching LOADED_FEATURE and target is in inner loop,
so I only let it out.
LOADED_FEATURE is not matched with target with many case, and patch
makes return fast.

In your patch, cache processing is similar to its feature, and already
optimized.


Regards,
Masaya