Skip to content

bluss/rust-memchr

 
 

Repository files navigation

This crate provides a single function, memchr, which exposes a safe interface to the corresponding function in libc.

Build status Build status

Dual-licensed under MIT or the UNLICENSE.

Documentation

http://burntsushi.net/rustdoc/memchr/.

Performance

On my system (Linux/amd64), memchr is about an order of magnitude faster than the more idiomatic haystack.iter().position(|&b| b == needle):

test iterator    ... bench:       5,301 ns/iter (+/- 2,745)
test libc_memchr ... bench:         203 ns/iter (+/- 17)

About

Exposes a safe interface to libc's memchr in Rust.

Resources

License

Unlicense and 2 other licenses found

Licenses found

Unlicense
UNLICENSE
Unknown
COPYING
MIT
LICENSE-MIT

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 94.7%
  • Makefile 4.3%
  • Vim Script 1.0%