[racket-dev] gc vs assignment
On Tue, Aug 24, 2010 at 3:43 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Tue, 24 Aug 2010 09:53:21 -0700, Joe Marshall wrote:
>> I'm surprised that racket3m uses page protection. Taking a hardware trap
>> can often be thousands of times slower than taking an inline conditional
>> branch.
>
> The hardware trap happens once per GC-managed page between minor
> collections, while the inline condition happens every time an
> assignment is performed.
Right, but you have to have a marking granularity that is equal to the
page size.
Hosking and Moss discovered that card marking can be competitive with or
faster than using the hardware.
>
> I haven't been able to construct a program that mutates many pages a
> small number of times between collections, thus maximizing the relative
> cost of the trap versus a potential implementation with an inline
> conditional; does enough work to trigger collections; and performs
> little enough work relative to mutation so that the barrier cost is
> measurable.
Does Will Clinger have any data?
--
~jrm