2 ms·
Does it have to do with when garbage collection is triggered?
by kmoser 2y ago
Does it have to do with when garbage collection is triggered?
- bediger4000 2y agoI don't think so. There's no garbage generated during the sort, which is what I'm timing. I'm sure that GC runs during the sorts, but it won't do significant amounts of work because of that. A C-transliteration of my original Go algorithm shows similar overall performance, with performance drops at the same list lengths. Forcing garbage collection right after each sort (releasing all references to the sorted linked list) didn't change anything, either: https://bruceediger.com/posts/mergesort-investigation-10/ https://bruceediger.com/posts/mergesort-investigation-10/