4 ms·
> one line of unsafe code (a call to the libc "memchr" function) Is burntsushi's Rust implementation of memchr notably slower than libc's?
by kibwen 10y ago
> one line of unsafe code (a call to the libc "memchr" function)
Is burntsushi's Rust implementation of memchr notably slower than libc's?
- mbrubeck 10y ago> Is burntsushi's Rust implementation of memchr notably slower than libc's? Not as far as I know. A lot of this benchmarksgame code has evolved slowly over time and hasn't been cleaned up yet to use "modern" crates and language features.
- deleted 10y ago[deleted]
- burntsushi 10y agoThe rust-memchr crate uses libc's memchr if it's available and known to be fast. Otherwise, it falls back to a pure Rust implementation (written by bluss, not me). I expect this to change once we get SIMD. ;-)