On Tue, 31 Mar 2015 05:57:45 +0000, Vladimir Panteleev wrote: > On Tuesday, 31 March 2015 at 05:42:02 UTC, ketmar wrote: >> i think that DDMD can start with GC turned off, and automatically turn >> it on when RAM consumption goes over 1GB, for example. this way >> small-sized (and even middle-sized) projects without heavy CTFE will >> still enjoy "nofree is fast" strategy, and big projects will not eat >> the whole box' >> RAM. > > Recording the information necessary to free memory costs performance > (and more memory) itself. With a basic bump-the-pointer scheme, you > don't need to worry about page sizes or free lists or heap fragmentation > - all allocated data is contiguous, there is no metadata, and you can't > back out of that.
TANSTAAFL. alas. yet without `free()` there aren't free lists to scan and so on, so it can be almost as fast as bump-the-pointer. the good thing is that user doesn't have to do the work that machine can do for him, i.e. thinking about how to invoke the compiler -- with GC or without GC.
signature.asc
Description: PGP signature
