Just reading through “In place sorting for views” and cannot wrap my head around the following allocations in my case:
x = [2,1,10,15,20] @btime sort!(view($x, 2:4)) 53.308 ns (2 allocations: 96 bytes)
To check I also tried the following, which looks fine:
@btime sort!($x) 29.256 ns (0 allocations: 0 bytes) @btime view($x, 2:4) 2.933 ns (0 allocations: 0 bytes)
I have allocations for the in-place view sort on both
1.8.0. I’m surprised this didn’t work, so I’m probably missing something stupid here?