4 ms·
Can you give me an example of a language with GC that doesn't introduce non-deterministic delays?
by learc83 10y ago
Can you give me an example of a language with GC that doesn't introduce non-deterministic delays?
- rwmj 10y agoI can reference Richard Jones's[1] Garbage Collection Handbook (http://gchandbook.org/contents.html http://gchandbook.org/contents.html) which has a whole chapter on Real Time Garbage Collectors. [1] Despite us sharing the same name, that's not me.
- dom96 10y agoThe Nim programming language's default GC[1] allows you to specify an upper bound delay time that it should not exceed. 1: https://nim-lang.org/docs/gc.html#realtime-support https://nim-lang.org/docs/gc.html#realtime-support
- learc83 10y agoAccording to the docs "These procs provide a 'best effort' realtime guarantee...Tests show that a 2ms max pause time will be met in almost all cases on modern CPUs" So suitable for soft realtime like games, but not actually non-deterministic.
- nickpsecurity 10y agoI did here: https://news.ycombinator.com/item?id=14108543 https://news.ycombinator.com/item?id=14108543 It's the GC rather than the language you have to focus on unless it's a dynamic language supporting features like LISP. One like Java or Rust can use the most predictable subset of the language combined with hard, real-time GC. Many of those exist & at least one had plenty of commercial deployment with a Java subset.