Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed amount of work for rb_tree.jl #61

Merged
merged 3 commits into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions benches/slow/rb_tree/rb_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ struct PointByY
end
Base.isless(a::PointByY, b::PointByY) = isless(a.p.y, b.p.y)

function tvbench(; N = 100_000_000, min_seconds = 0, max_seconds = 1000)
@assert min_seconds <= max_seconds

function tvbench(; N = 50_000_000)
t0 = time()
queue = Queue{Point}()
xtree = RBTree{PointByX}()
Expand Down Expand Up @@ -99,7 +97,7 @@ function tvbench(; N = 100_000_000, min_seconds = 0, max_seconds = 1000)
tcheck = tcheck2
println("elapsed=$(elapsed)s, $(length(queue)) current points, $(count) total, $(floor(count/elapsed)) per second")
end
if (elapsed >= min_seconds) && ((count >= N) || (elapsed >= max_seconds))
if (count >= N)
break
end
end
Expand Down