On Monday, 12 September 2016 at 22:57:23 UTC, Andrei Alexandrescu
wrote:
This may be interpreted as follows: the iPhone uses native apps
with reference counting
I think the native part is fair, but the RC part maybe not. I
know first hand that they have a fair amount of problem on the
side.
whereas the Android uses a virtual machine with tracing garbage
collection.
Dalvik's GC is truly horrible and Java is addicted to memory
allocations, which makes it worse. A match made in hell.
It follows that the latter needs more memory for the same
performance,
and is more jerky in behavior than the former.
Putting a stop the world GC in a UI program is the worst idea
ever. Doing this java is giving steroïd to the worse idea ever. I
have no idea what Google was thnking here.
Wondering to what extent this is true. If it is, that provides
more impetus for reference counting for D by the following
logic: (a) it is likely that in the future more code will run
on portable, battery-powered systems; (b) battery power does
not follow a Moore trajectory, so at this point in history
demand for battery lifetime is elastic.
RC itself is not panacea, it doesn't work well with exceptions,
generate a huge amount of code bloat, hurt throughput, which you
don't care in UI thread, but do care in the backend, and so on.
But first and foremost, it is a disaster for shared data.
I stay convinced that an hybrid approach is inevitable and am
surprised why few are going there (hello PHP, here is a thing you
get right).