Project

General

Profile

Actions

Feature #641

closed

GC patch to cache the most recent heap for is_pointer_to_heap

Added by rogerdpack (Roger Pack) over 15 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
[ruby-core:19301]

Description

=begin
This patch seems benign and speeds up gc a bit.
In a completely contrived test [meant to hammer the GC]:

require 'benchmark'
require 'pp'
a = []
1_000_000.times { a << [3] }
pp Benchmark.measure { 33.times { GC.start }}

speed went from
@real=1.99618101119995,

to
@real=1.75,

[I think Hongli does something similar with bit field lookups]. A similar patch might work for 1.8.6
Thanks!
=end


Files

cache_latest_heap.diff (1.27 KB) cache_latest_heap.diff rogerdpack (Roger Pack), 10/12/2008 03:40 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0