From: funny.falcon@... Date: 2016-10-07T13:24:46+00:00 Subject: [ruby-core:77516] [Ruby trunk Feature#8158] lightweight structure for loaded features index Issue #8158 has been updated by Yura Sokolov. I've changed implementation a bit: Because https://bugs.ruby-lang.org/issues/12142 likely to be accepted, I've used st_table with numtable instead of separate datastructure. So patch now is shorter. https://bugs.ruby-lang.org/attachments/download/6182/0001-load.c-reduce-memory-usage-of-loaded_features_index.patch ---------------------------------------- Feature #8158: lightweight structure for loaded features index https://bugs.ruby-lang.org/issues/8158#change-60779 * Author: Yura Sokolov * Status: Assigned * Priority: Normal * Assignee: Nobuyoshi Nakada ---------------------------------------- Use lightweight structure for loaded_features index: - use hand made simple hash structure, which uses only one memory chunk, - do not store feature name string, only hash of it, since loaded_feature_path will recheck feature name on hash collision - use single linked lists instead of arrays for storing features indices. - store this lists inside one array, using array's indices as a reference. While startup speedup improvement is relatively small compared current implementation, this one does not need any Ruby Objects at all, so that there is no presure on GC. https://github.com/ruby/ruby/pull/264.patch https://github.com/ruby/ruby/pull/264.diff https://github.com/ruby/ruby/pull/264 ---Files-------------------------------- 264.patch (14.9 KB) 0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.87 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: