summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-11-05 22:44:33 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-11-05 22:44:33 -0400
commit5bd0edbbe10364d085ff0d314b2513e0e9fbf162 (patch)
treee8756ae3ef9c695e34d4657ede83e43de1c36e8d
parent4368913d8fc174cf21fcb9d04b24136ceb87a393 (diff)
Actually use simd/avx optimizations in bytecount crate.
Also update compile script.
-rw-r--r--Cargo.lock3
-rw-r--r--Cargo.toml3
-rwxr-xr-xcompile6
3 files changed, 8 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d497e7b7..7b502738 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -33,6 +33,9 @@ dependencies = [
name = "bytecount"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "simd 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
[[package]]
name = "crossbeam"
diff --git a/Cargo.toml b/Cargo.toml
index 23135f30..b60f7f98 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,7 +45,8 @@ kernel32-sys = "0.2"
winapi = "0.2"
[features]
-simd-accel = ["regex/simd-accel"]
+avx-accel = ["bytecount/avx-accel"]
+simd-accel = ["bytecount/avx-accel", "regex/simd-accel"]
[profile.release]
debug = true
diff --git a/compile b/compile
index 429e02e5..882f9608 100755
--- a/compile
+++ b/compile
@@ -1,5 +1,5 @@
#!/bin/sh
-export RUSTFLAGS="-C target-feature=+ssse3"
-# export RUSTFLAGS="-C target-cpu=native"
-cargo build --release --features simd-accel
+# export RUSTFLAGS="-C target-feature=+ssse3"
+export RUSTFLAGS="-C target-cpu=native"
+cargo build --release --features 'simd-accel avx-accel'