tomarrell / rust-elias-fano

Elias-Fano encoding implementation in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor MSB

tomarrell opened this issue · comments

"It is non trivial whether this code is actually correct for all u64 :

https://github.com/tomarrell/rust-elias-fano/blob/master/src/utils.rs#L33

u64::heading_zeros is a better implementation of msb. Again it compiles to one instruction, and it does not require to study f64 and its log implementation to know whether it is correct or not." - fulmicoton

Fixed in b34f31d