News for hackers. Stuff that matters.
Re:Organizations Using the D Language by MaxBarraclough on Tuesday February 16, 2021 @05:55PM (#26159859)
> D, which uses GC here and there and a lot of non-GC pointers and allocations

Won't this depend on the programming style used? If the programmer makes heavy use of functional programming, or for that matter Java-style programming, wouldn't that result in a lot of object churn through the GC?

Re:Organizations Using the D Language by WalterBright on Tuesday February 16, 2021 @06:39PM (#26160326)
Java does not have stack allocated objects like struct instances. They get allocated via the GC (sometimes the Java optimizer can optimize these to be stack allocated).

Personally, I make very heavy use of stack allocated objects, even for temporary buffers. Stack allocated objects cost nothing to allocate, nothing to free, and (being on the stack) are already in the hot memory cache.

Re:Organizations Using the D Language by mhh__ on Tuesday February 16, 2021 @06:21PM (#26160115)
Functional code as usually written in D doesn't have this problem because people are aware of this - most compositions are extremely lazy, allocations are trivial to group together because of allocators in the stdlib