Skip to content

Commit

Permalink
update docs about simd usage
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jun 22, 2018
1 parent a6c8d81 commit 4f7c5a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@ env:
-
- CARGO_CFG_HTTPARSE_DISABLE_SIMD=1
- CARGO_CFG_HTTPARSE_DISABLE_SIMD_COMPILETIME=1 RUSTFLAGS="-C target_feature=+sse4.2"
#- CARGO_CFG_HTTPARSE_DISABLE_SIMD_COMPILETIME=1 RUSTFLAGS="-C target_feature=+avx2"
#- CARGO_CFG_HTTPARSE_DISABLE_SIMD_COMPILETIME=1 RUSTFLAGS="-C target_feature=+sse4.2,+avx2"
- RUSTFLAGS="-C target_feature=+sse4.2"
#- RUSTFLAGS="-C target_feature=+avx2"
#- RUSTFLAGS="-C target_feature=+sse4.2,+avx2"

matrix:
#fast_finish: true
fast_finish: true
include:
- rust: 1.10.0 # minimum Rust version
script: # don't run tests, since dev-dependencies don't build on 1.10
Expand Down
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
//! parsing internals use an `Iterator` instead of direct indexing, while
//! skipping bounds checks.
//!
//! The speed is faster than picohttpparser, when SIMD is not available.
//! With Rust 1.27.0 or later, support for SIMD is enabled automatically.
//! If building an executable to be run on multiple platforms, and thus
//! not passing `target_feature` or `target_cpu` flags to the compiler,
//! runtime detection can still detect SSE4.2 or AVX2 support to provide
//! massive wins.
//!
//! If compiling for a specific target, remembering to include
//! `-C target_cpu=native` allows the detection to become compile time checks,
//! making it *even* faster.
#[cfg(feature = "std")]
extern crate std as core;

Expand Down

0 comments on commit 4f7c5a3

Please sign in to comment.