From: Yukihiro Matsumoto Date: 2010-01-12T04:32:43+09:00 Subject: [ruby-core:27546] Re: [Feature #2594] 1.8.7 Patch: Reduce time spent in gc.c is_pointer_to_heap(). Hi, In message "Re: [ruby-core:27545] [Feature #2594] 1.8.7 Patch: Reduce time spent in gc.c is_pointer_to_heap()." on Tue, 12 Jan 2010 03:45:44 +0900, Kurt Stephens writes: |Rationale: |* The size of struct heap_slots grows exponentially. |* add_heap() puts new heaps on the end of the heaps[] array. |* The newest heaps are placed toward the end. |* The newer heaps are larger, thus are more likely to contain valid pointers than smaller heaps. |* sort_heaps() reorders the heaps[] array such that early probes are more likely to match in larger heaps. | |This was developed under REE 1.8.7, and ported to 1.8.7. Interesting. But why didn't you use binary search as 1.9 GC does? matz.