Skip to content

Commit

Permalink
adding benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner95 committed Jun 27, 2023
1 parent 42d6f54 commit f21b239
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions prototype/sorttest.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using SyncSort

using BenchmarkTools

@inbounds function test1(n)

x = rand(n)
y = rand(n)
z = rand(n)

syncsort!(x,y,z)
x,y,z
end

@inbounds function test2(n)

x = rand(n)
y = rand(n)
z = rand(n)

isorted = sortperm(x)
x = x[isorted]
y = y[isorted]
z = z[isorted]

x,y,z
end

println("syncsort")
display(@benchmark(test1(100_000)))

println("sortperm")
display(@benchmark(test2(100_000)))

0 comments on commit f21b239

Please sign in to comment.