3 ms·
In Java, everything is heap allocated, whereas in D you have a choice.
by nemothekid 6y ago
In Java, everything is heap allocated, whereas in D you have a choice.
- chrisseaton 6y ago> everything is heap allocated You can definitely write useful Java applications where nothing gets heap allocated, through using existing objects, and through using scalar-replacement-of-aggregates.
- wokkel 6y agoNot entirely correct: https://shipilev.net/jvm/anatomy-quarks/18-scalar-replacement/ https://shipilev.net/jvm/anatomy-quarks/18-scalar-replacemen... . Hoi cannot force a specific allocation, but the jit does do something akin to stack allocation.