Feature #8158

lightweight structure for loaded features index

Added by Yura Sokolov about 1 year ago. Updated 3 months ago.

[ruby-core:53688]
Status:Assigned
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:core
Target version:current: 2.2.0

Description

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 loadedfeaturepath 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

264.patch Magnifier (14.9 KB) Zachary Scott, 04/05/2013 11:43 AM

History

#2 Updated by Zachary Scott about 1 year ago

#3 Updated by Nobuyoshi Nakada 7 months ago

  • Status changed from Open to Assigned
  • Assignee set to Nobuyoshi Nakada

#4 Updated by Hiroshi SHIBATA 3 months ago

  • Target version changed from 2.1.0 to current: 2.2.0

Also available in: Atom PDF