Re:Sadly, I must say goodbye to Leaf, my programming language
by makomk on Wednesday August 08, 2018 @05:00AM
(#17714190)
As I understand it, garbage collection is kind of a non-starter for games programming because it leads to unpredictable pauses in what should be a low-latency, interactive application.
[ Parent
| on HN ]
Re:Sadly, I must say goodbye to Leaf, my programming language
by qznc on Wednesday August 08, 2018 @08:00AM
(#17715123)
You can put the low-latency stuff in a non-gc thread which will not be interrupted [0] and still use the convenient garbage collector for the rest.
[0] https://p0nce.github.io/d-idioms/#The-impossible-real-time-t...
Re:Sadly, I must say goodbye to Leaf, my programming language
by p0nce on Wednesday August 08, 2018 @07:49AM
(#17715042)
Infognition has found that if you keep the D GC heap under 100k the max pauses will be about 1 ms.
The means to reduce GC usage have only grown more diverse in recent years:
- std.experimental.allocator
- @nogc to ensure, well, no GC usage
- various things built on placement new (`emplace`)
- GC profiling with -profile=gc, will display number of allocations and size
None of this existed when people were already making high-performance systems with D...
Re:Sadly, I must say goodbye to Leaf, my programming language
by bausshf on Wednesday August 08, 2018 @05:16AM
(#17714235)
It is optional however and you can use custom allocators to get around it.
Re:Sadly, I must say goodbye to Leaf, my programming language
by xxs on Wednesday August 08, 2018 @08:03AM
(#17715143)
You can have low pause, fully concurrent GC even in Java. A GC can utilize read barriers and overall eliminate stop-the-world pauses.
--- A popular example is minecraft that uses mainstream G1 GC.