digitalmars.D - Quicker GC group allocations
- bearophile (4/4) Nov 18 2009 Can something similar be done to the D GC, that share the same problem?
- Sean Kelly (2/4) Nov 18 2009 Seems like that would require a generational GC? If so, that pretty muc...
Can something similar be done to the D GC, that share the same problem? http://bugs.python.org/issue4074 Bye, bearophile
Nov 18 2009
bearophile Wrote:Can something similar be done to the D GC, that share the same problem? http://bugs.python.org/issue4074Seems like that would require a generational GC? If so, that pretty much means a new GC. If performance is an issue for a known allocation scheme, it may also be worth calling GC.reserve() beforehand. This will pre-allocate a bunch of free memory within the GC and keep it from needing to collect, assuming you're just growing your data pool. In casual tests, if I simply looked at the high-water mark for my app's memory usage and called GC.reserve() with that number at the beginning of main() my app performance was double or better than it was without the reserve() line.
Nov 18 2009