Conversation

Even leaving Rust aside, by choosing a memory-unsafe language, you're saying that the small delta in performance between GC and no-GC is worth more to your app than massive unavoidable-in-practice security problems. Seems extremely dubious.
34
471
I wonder what fraction of programmers are aware that any GC technique exists other than mark and sweep and naive reference counting.
6
111
Replying to
the most common complaint about GC i hear isn't the small delta in performance, but the large delta in worst-case latency that makes even soft real-time applications hard to develop
1
47
Replying to and
I thought that fixed in recent years with more latency sensitive algorithms (which some modern languages always use and in case of java you can opt into using)?
1
4
OpenJDK design choices are very focused on long running server applications. Design choices for the Android Runtime are far different. Has equally modern concurrent compacting GC with a focus on latency for apps in foreground and memory usage in the background, not throughput.
1
7
Android 5 switched to full AOT compilation for everything other than one-time initialization code because JIT compilation is horrible for memory usage and battery life. Android 6 moved to current hybrid JIT/interpreter/AOT approach where most code used at runtime is AOT compiled.
1
4
JIT compilation in v8 and OpenJDK uses a ton of resources and a ton of memory. v8 has started focusing more on having a fast interpreter and they actually do cache code for reuse later on but they can't do that aggressively since web sites are so much less predictable than apps.
1
3
If you look at an Android app's memory, the GC heap is always in the lower 32-bit in order to use 32-bit pointers and apps have a small heap unless they're badly written and need to enable a large one. There's also special concurrent GC for bitmaps, etc. Special cases help a lot.
1
1
Show replies