[Issue 2900] Array appending slowed drastically since integration of druntime

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 25 21:09:27 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2900





------- Comment #1 from dsimcha at yahoo.com  2009-04-25 23:09 -------
Created an attachment (id=340)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=340&action=view)
Fix by adding BlkInfo caching to druntime GC.

I've figured out the problem.  In lifetime.d, the druntime devs tried to
improve the allocation model in a way that required the whole BlkInfo struct
from the GC, so the caching of size info wasn't used.  This patch addresses
this by adding caching of BlkInfo similar to caching of size to the GC.  

It also fixes a subtle bug in the size caching that I found while reading the
code:  When free() is called on the block whose size is currently being cached,
that cache information is not cleared.


-- 



More information about the Digitalmars-d-bugs mailing list