Class size and performance
torhu
no at spam.invalid
Sun Jan 20 19:11:32 PST 2008
Unknown W. Brackets wrote:
> Ah, thank you. That makes a lot of sense. I thought it was interesting
> that it was near the 64 mark, but didn't realize there were both vtbl
> and monitor pointers.
>
> Sounds like this would probably be resolved by creating a custom
> allocator, which preallocates space for a number of instances in chunks,
> which was already an idea I had to test for optimizing performance (the
> objects themselves will most likely be deleted all at once, or not, so
> this should be a good optimization.)
One trick Walter uses in DMD is free lists, did you check out that?
Obviously it won't work if you need all of the objects allocated at the
same time.
http://www.digitalmars.com/d/memory.html#freelists
More information about the Digitalmars-d-learn
mailing list