-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
Hey!
Allocations are made when sorting a view of an Int64 array (tested on 1.7.3 and 1.8.0), as discussed here on discourse. @mkoculak spotted that such allocations do not occur for Float64:
x = [2,1,10,15,20]
y = [2.0,1.0,10.0,15.0,20.0]
@btime sort!(view($x,2:4))
33.898 ns (2 allocations: 96 bytes)
@btime sort!(view($y,2:4))
19.645 ns (0 allocations: 0 bytes)
I guess allocations should also not be required for Int64?