build scripts: disable avx512, since it decreases performance

This commit is contained in:
Joakim Frostegård 2020-07-31 01:34:13 +02:00
parent 225a76e075
commit 0d8b6f6cc4
7 changed files with 54 additions and 8 deletions

View file

@ -5,8 +5,6 @@
* use ipv4-mapped address functions, but I should check that they really
work as they really work as they should. All announces over ipv4 should
go to ipv4 map, all over ipv6 to ipv6 map
* avx-512 should be avoided, maybe this should be mentioned in README
and maybe run scripts should be adjusted
## aquatic_http_load_test

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS""
cargo run --release --bin aquatic_udp_bench -- $@

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS"
cargo run --release --bin aquatic_http -- $@

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS"
cargo run --release --bin aquatic_udp -- $@

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS"
cargo run --release --bin aquatic_ws -- $@

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS"
cargo run --release --bin aquatic_http_load_test -- $@

View file

@ -1,5 +1,13 @@
#!/bin/sh
export RUSTFLAGS="-C target-cpu=native"
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
echo "Compiling with RUSTFLAGS=$RUSTFLAGS"
cargo run --release --bin aquatic_udp_load_test -- $@