For Better Computing, Liberate CPUs from Garbage Collection
spectrum.ieee.org
For Better Computing, Liberate CPUs from Garbage Collection
1–10 of 460 posts
Re: For Better Computing, Liberate CPUs from Garbage Collection
#2https://people.eecs.berkeley.edu/~krste/papers/maas-isca18-h...
ETA: this doesn't seem to be quite the paper that the story refers to, but undoubtedly describes the same work in enough detail for people to get the gist of it. Darn paywalls.
Re: For Better Computing, Liberate CPUs from Garbage Collection
#3I think for platforms like Android this makes a lot of sense. Should help quite a bit with battery consumption and responsiveness. Also makes sense for server loads in Java or Go.
Re: For Better Computing, Liberate CPUs from Garbage Collection
#4I’m probably wrong, but didn’t the Symbolics LISP machines have some kind of hardware support for GC? I think for platforms like Android this makes a lot of sense. Should help quite a bit with battery consumption and responsiveness. Also makes sense for server loads in Java or Go.
Re: For Better Computing, Liberate CPUs from Garbage Collection
#5Re: For Better Computing, Liberate CPUs from Garbage Collection
#6I’m probably wrong, but didn’t the Symbolics LISP machines have some kind of hardware support for GC? I think for platforms like Android this makes a lot of sense. Should help quite a bit with battery consumption and responsiveness. Also makes sense for server loads in Java or Go.
Re: For Better Computing, Liberate CPUs from Garbage Collection
#7Re: For Better Computing, Liberate CPUs from Garbage Collection
#8If everyone used some compiled language that was just a little simpler, a little safer, had just a little better memory management/tooling, or like here, had better hardware support, how much would that reduce global emissions caused by data centers?
Re: For Better Computing, Liberate CPUs from Garbage Collection
#9Re: For Better Computing, Liberate CPUs from Garbage Collection
#10It does seem like just doing it in hardware may be a linear gain but isn't a fundamentally better algorithm. There's a proof that you do need to pause your program eventually, if you want to be sure you get all the garbage.
As a simple example, what is the time complexity of zeroing out n bytes of memory. With a CPU, this is O(n). However, with proper hardware support, this can be done in O(1) time.
For a simple garbage collecting example (no idea how their chip does it), consider a simple mark and sweep algorithm. Assume the chip has an internal object graph. At the begining of GC, only root nodes are tagged. At each step, the neighboor of every tagged node is tagged. With a CPU, this step takes at least Ω(n) time, where n is the number of tagged nodes. However, if this is done entirely by hardware, then (depending on how the hardware is designed) each node can independently look at its neighboors and complete a single step in just O(1) time.
Moving stuff to hardware gives you a set of primitives that is asymptotically different than the primitives you have on a general purpose CPU.