News for hackers. Stuff that matters.
Re:How low can you go? Ultra low latency Java in the real wo... by pkolaczk on Friday December 21, 2018 @01:32PM (#18735384)
Only theoretically. It is not possible to implement a GC as efficient as Java GCs for C++. Pointer arithmetic, placement new, and other low level features make it hard to determine pointers from non-pointers and to move things in memory.
Re:How low can you go? Ultra low latency Java in the real wo... by kazinator on Friday December 21, 2018 @03:28PM (#18736332)
"It is not possible" claims are very hard to substantiate.

Java is just someone's C++ program.

> "Pointer arithmetic, placement new, and other low level features make it hard to determine pointers from non-pointers and to move things in memory."

Real applications in a garbage collected language are mixtures of the managed code, plus unmanaged components (like foreign libraries).

Garbage collected C++ can work in much the same way: there is a framework for managed code that uses GC, and then there are unsafe parts that are analogous to foreign code. (Except, the managed code can much more easily and efficiently interact with this code than the typical FFI.)

There is more than one way to integrate garbage collection into C++, in any case.

Re:How low can you go? Ultra low latency Java in the real wo... by kazinator on Friday December 21, 2018 @07:52PM (#18738119)
> move things in memory.

Not all garbage-collection schemes move things in memory; only copying and/or compacting garbage collectors do.