From: "tmm1 (Aman Gupta)" Date: 2013-12-03T13:48:11+09:00 Subject: [ruby-core:58824] [ruby-trunk - Bug #9201] [patch] remove GC overhead for loaded_features_index Issue #9201 has been updated by tmm1 (Aman Gupta). In features_index_add_single, we already Check_Type(offset, T_FIXNUM). This ensures these off-heap RArrays will only contain immediates and do not need to be marked. ---------------------------------------- Bug #9201: [patch] remove GC overhead for loaded_features_index https://bugs.ruby-lang.org/issues/9201#change-43387 Author: tmm1 (Aman Gupta) Status: Open Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: Target version: current: 2.1.0 ruby -v: ruby 2.1.0dev (2013-12-02 trunk 43955) Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN I was profiling minor GC in our app and noticed 15% of time spent in mark_tbl for loaded_features_index. The following patch removes this overhead by storing feature offsets outside the ruby heap: https://github.com/tmm1/ruby/commit/d03c5ece865422f0510957c1dee1d33a1d9eca82 -- http://bugs.ruby-lang.org/