On Friday, 9 February 2018 at 21:24:14 UTC, Walter Bright wrote:
On 2/9/2018 1:14 AM, meppl wrote:
let's say python is supposed to offer slow execution. So,
python doesn't prove reference counting is fast (even if it is
possible in theory). D on the other hand provides binaries who
are expected to execute fast.
I believe it has been shown (sorry, no reference) that GC is
faster in aggregate time, and RC is perceived faster because it
doesn't have pauses.
RC is a form of GC. Also tracing GCs with pause times under 1ms
are in production for seceral languages now.
This makes GC better for batch jobs, and RC better for
interactive code.
Yes GCs with lower pause time sacrifices throughput for low
latency. RC included.
Of course, the issue can get more complex. GC uses 3x the
memory of RC,
I’ve seen figures of about x2 but that was in an old paper on
Boehm GC.
and so you can get extra slowdowns from swapping
Oh come on... anything touching swap is usually frozen these
days. Plus heap size is usually statically bounded for GC
languages, choosen not to grow beyond ram.
and cache misses.