Re:D’s Garbage Collector Problem
by tachyonbeam on Wednesday September 10, 2014 @04:24PM
(#8298890)
Exactly. Someone told me I should "avoid using the GC completely". I answered that this was basically a way of saying that I should implement my own application specific GC. It's shifting the burden onto the application developer. What I'm saying is that the D GC could probably be several times faster. That much should be obvious.
[ Parent
| on HN ]
Just use structs, unions and arrays of them:
Preallocate them and don't increase their size one at the time. And in them use indexes to positions instead of pointers. Then GC won't make you problems anymore. It would be used but it won't be a bottleneck as it would simply get much less but bigger chunks of memory and much less pointers to worry about.