< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #5427 has been updated by Yura Sokolov.
Nikolai Weibull wrote:
> Yura Sokolov wrote:
>> Sorry, you are right, I confused `require_relative 'somelib'` with `require './somelib'`.
>> `require_relative` still gains improvement from this patch
> 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.
Sorry again, I thought it was clear when I said "sorry" first time I admit this fact.
Thank you for reprimand.
----------------------------------------
Feature #5427: Not complex patch to improve `require` time (load.c)
http://redmine.ruby-lang.org/issues/5427
Author: Yura Sokolov
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
Currently `loaded_features` are unsorted, so that `rb_feature_p` ought to iterate over all `loaded_features` to figure: is requested feature loaded?
After this patch `loaded_features` is kept sorted by basename without extension (/usr/lib/ruby/asdf.rb => asdf). When `rb_feature_p` start its check, it goes straight to the first item with matching basename (using binary search) and stops after last.
Methods `$LOADED_FEATURES.<<` and `$LOADED_FEATURES.push` are overriden to keep sort order. `push` accepts only 1 parameter, but it seems that no one pass more to it.
Currently I choose to consider characters of basename in right to left order, but it could be changed, I think.
https://gist.github.com/1272991
https://github.com/ruby/ruby/pull/51
--
http://redmine.ruby-lang.org