Crates.io | memo_int_sqrt |
lib.rs | memo_int_sqrt |
version | 0.1.1 |
source | src |
created_at | 2019-02-04 21:28:31.783537 |
updated_at | 2019-02-05 21:58:33.326594 |
description | Memoized square root and inverse square root for integers |
homepage | https://github.com/stevebob/memo-int-sqrt.git |
repository | https://github.com/stevebob/memo-int-sqrt.git |
max_upload_size | |
id | 112765 |
size | 9,204 |
Definitely run the benchmarks before using this. In my benchmarking, I found that for f32
s, .sqrt().recip()
is often
faster than using the lookup table. For f64
s, the lookup table is faster for inverse squareroot, but not for squareroot.