Skip to content

Commit

Permalink
Update benchmark_tests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Apr 26, 2024
1 parent 129ad1b commit b78cfb2
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/benchmark_tests.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

@testset "benchmarks" begin
rng = Xoshiro(42)
iter = Iterators.filter(x -> x != 10, 1:10^4)
wv(el) = 1.0
for m in (algR, algL, algRSWRSKIP)
b = @benchmark itsample($rng, $iter, 10, $m) evals=1
println("Method $m")
println(" Time: $(round(median(b.times)*1e-3, digits=2)) μs")
println(" Memory: $(b.memory) bytes")
end
for m in (algARes, algAExpJ, algWRSWRSKIP)
b = @benchmark itsample($rng, $iter, $wv, 10, $m) evals=1
println("Method $m")
println(" Time: $(round(median(b.times)*1e-3, digits=2)) μs")
println(" Memory: $(b.memory) bytes")
end
rng = Xoshiro(42)
iter = Iterators.filter(x -> x != 10, 1:10^4)
wv(el) = 1.0
for m in (algR, algL, algRSWRSKIP)
b = @benchmark itsample($rng, $iter, 10, $m) evals=1
println("Method $m")
println(" Time: $(round(median(b.times)*1e-3, digits=2)) μs")
println(" Memory: $(b.memory) bytes")
end
for m in (algARes, algAExpJ, algWRSWRSKIP)
b = @benchmark itsample($rng, $iter, $wv, 10, $m) evals=1
println("Method $m")
println(" Time: $(round(median(b.times)*1e-3, digits=2)) μs")
println(" Memory: $(b.memory) bytes")
end
end

0 comments on commit b78cfb2

Please sign in to comment.