Comment by tracyspacy

9 hours ago

I don't think the loop unrolling plays a big role here, I guess it was more an example. While post body contains control flow, it can be simple arithmetic operation instead and it will lead to the similar result, so not the control flow itself causing this. But yeah, I also feel, that more complex closure blocks some optimizations here, thus quicksort having less instructions. I suspect that complex closure was outlined to a separate fn, and not copied to quicksort anymore.