@@ -33,21 +33,26 @@ n = 1_000_000
3333ix = ArrayType (ones (Int, n))
3434
3535
36+ # Memory-bound, so not much improvement expected when multithreading
3637println (" \n ===\n Benchmarking sortperm! on $n UInt32 - Base vs. AK" )
3738display (@benchmark Base. sortperm! ($ ix, v) setup= (v = ArrayType (rand (UInt32 (1 ): UInt32 (1_000_000 ), n))))
3839display (@benchmark AK. sortperm! ($ ix, v) setup= (v = ArrayType (rand (UInt32 (1 ): UInt32 (1_000_000 ), n))))
3940
4041
41- println (" \n ===\n Benchmarking sortperm! on $n Int64 - Base vs. AK" )
42- display (@benchmark Base. sortperm! ($ ix, v) setup= (v = ArrayType (rand (Int64 (1 ): Int64 (1_000_000 ), n))))
43- display (@benchmark AK. sortperm! ($ ix, v) setup= (v = ArrayType (rand (Int64 (1 ): Int64 (1_000_000 ), n))))
42+ # Lexicographic sorting of tuples - more complex comparators
43+ ntup = 5
44+ println (" \n ===\n Benchmarking sortperm! on $n NTuple{$ntup , Int64} - Base vs. AK" )
45+ display (@benchmark Base. sortperm! ($ ix, v) setup= (v = ArrayType (rand (NTuple{ntup, Int64}, n))))
46+ display (@benchmark AK. sortperm! ($ ix, v) setup= (v = ArrayType (rand (NTuple{ntup, Int64}, n))))
4447
4548
49+ # Memory-bound again
4650println (" \n ===\n Benchmarking sortperm! on $n Float32 - Base vs. AK" )
4751display (@benchmark Base. sortperm! ($ ix, v) setup= (v = ArrayType (rand (Float32, n))))
4852display (@benchmark AK. sortperm! ($ ix, v) setup= (v = ArrayType (rand (Float32, n))))
4953
5054
55+ # More complex by=sin
5156println (" \n ===\n Benchmarking sortperm!(by=sin) on $n Float32 - Base vs. AK" )
5257display (@benchmark Base. sortperm! ($ ix, v, by= sin) setup= (v = ArrayType (rand (Float32, n))))
5358display (@benchmark AK. sortperm! ($ ix, v, by= sin) setup= (v = ArrayType (rand (Float32, n))))
0 commit comments