System level language, GC, allocation and typeinfo

via Digitalmars-d digitalmars-d at puremagic.com
Tue May 27 23:42:05 PDT 2014


On Tuesday, 27 May 2014 at 17:08:04 UTC, Etienne wrote:
> The GC could be optimized under x86_64, with 
> 18,446,744,073,709,551,615 possible values you don't exactly 
> have any computers with 18 exabytes (18,000 petabytes) of 
> memory. This is a lot of wasted space that could be used to 
> make the GC lookups at O(1) speed with parallel collection

That is probably true. If you also limit GC to class types and 
ban internal pointers you probably could get a decent speedup.

Another optimization is to make sure that all GC pointers are 
clustered on the same cacheline, for objects with inheritance 
this is a challenge. An unorthodox solution would be to place all 
gc pointers at a negative offset in the object instance. I 
believe a single cacheline can fit 8 pointers, so careful 
clustering could probably cut the amount of scanned memory by a 
significant amount. 50%?





More information about the Digitalmars-d mailing list