News for hackers. Stuff that matters.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by yakubin on Friday September 17, 2021 @09:33AM (#28565287)
> In most languages, freeing all all the heap-allocated objects of a big array will take longer than in a language with GC.

Only if elements of the array are separately allocated (boxed) or have destructors.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by Skinney on Saturday September 18, 2021 @03:49AM (#28574465)
And if the array is heap allocated.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by yakubin on Saturday September 18, 2021 @05:46AM (#28574925)
If the array is stack-allocated and the elements are boxed (i.e. heap-allocated) or have destructors, you are still going to need to call the destructors or the free on the elements when the array goes out of scope.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by ncmncm on Sunday September 19, 2021 @03:55PM (#28587373)
Such a layout, and all it costs, is typically unavoidable in GC languages, and usually easily avoided in non-GC languages, particularly in cases where it would matter.

Thus, it is incorrect to talk about multiple calls to a deallocator. You get just one for the whole array.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by Skinney on Monday September 20, 2021 @02:11AM (#28590776)
My point was: it still takes longer time to de-allocate a large array even if the only thing that needs to be freed is the array itself, when compared to a GC. GC never needs to free anything, it instead overwrites garbage memory with live memory.