Comment on Conservative GC can be faster than precise GCparentComments−matheusmoreira2yWith the precise gc, they had to make the change to only storing pointers, leading to allocating small values.Why? Many dynamic languages use a tagged pointer representation which isn't incompatible with precise garbage collectors. Couldn't Go do the same?−skybrian2yPerhaps because Go has pointers to the middle of records and arrays? (And records of arrays, etc.) It's an unusual language feature.−kbolino2yThis, plus Go pointers are real memory addresses, a property which is guaranteed by the runtime for unsafe pointer operations and C interop.
Comments
Why? Many dynamic languages use a tagged pointer representation which isn't incompatible with precise garbage collectors. Couldn't Go do the same?
Perhaps because Go has pointers to the middle of records and arrays? (And records of arrays, etc.) It's an unusual language feature.
This, plus Go pointers are real memory addresses, a property which is guaranteed by the runtime for unsafe pointer operations and C interop.