-
Notifications
You must be signed in to change notification settings - Fork 3
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
Benchmarking against, and possibly supplementing, lindel
#1
Comments
|
Branch with benchmark of linden: https://github.com/becheran/fast-hilbert/tree/linden-bench |
Thank you so much! Now, let's see.
Here is the code I used for the experiments in 2.: for _ in 0..1024 {
let x = rand::random::<u32>() & 65535;
let y = rand::random::<u32>() & 65535;
let original_key = fast_hilbert::xy2h(x, y, 32);
println!("x: {:010}\ny: {:010}\nkey: {}", x, y, original_key);
for i in (16..32).step_by(2) {
let new_key = fast_hilbert::xy2h(x, y, i);
assert_eq!(original_key, new_key);
}
} |
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lindel
crate in the benchmarks you produce? Mr Chernoch's code has some… inefficiencies, let's say, which I took upon myself to correct. I don't think it'll come anywhere remotely close to your own speed, but I also suspect it'll at least fall within the same ball-park as the other crates.u8
s oru16
s would be trivial, but the part about the arbitrary dimensions will take a bit more thought methinks.Thanks in advance!
The text was updated successfully, but these errors were encountered: