-
Notifications
You must be signed in to change notification settings - Fork 571
x: Remove vestigial features and update feature docs #857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@rozbb |
|
@tarcieri odd, I can't seem to make it show any difference on my machine. Do you see a perf difference when |
|
@rozbb I don't see a benchmark for fixed-base scalar multiplication e.g. |
|
Ah you're right. I added a benchmark. But now I'm seeing something very weird. On this branch (and ~/c/curve25519-dalek (cleanup-x-features)$ ./sizediff.sh
Enter the crate name (curve|x|ed): curve
Finished `release` profile [optimized] target(s) in 0.02s
Finished `release` profile [optimized] target(s) in 0.01s
Using precomputed-tables adds 397512 bytes
~/c/curve25519-dalek (cleanup-x-features)$ ./sizediff.sh
Enter the crate name (curve|x|ed): x
Finished `release` profile [optimized] target(s) in 0.02s
Finished `release` profile [optimized] target(s) in 0.01s
Using precomputed-tables adds 16 bytesThe script #!/bin/bash
set -eu
read -p "Enter the crate name (curve|x|ed): " CRATE
cargo build --release --no-default-features -p "${CRATE}25519-dalek"
SIZE_PLAIN=$(wc -c < "./target/release/lib${CRATE}25519_dalek.rlib")
cargo build --release --no-default-features -p "${CRATE}25519-dalek" --features "precomputed-tables"
SIZE_WITH_TABLES=$(wc -c < "./target/release/lib${CRATE}25519_dalek.rlib")
SIZE_DIFF=$(($SIZE_WITH_TABLES - $SIZE_PLAIN))
echo "Using precomputed-tables adds ${SIZE_DIFF} bytes"What's weirder is that when I do a |
|
@rozbb possibly feature unification? Try running |
|
Hmm that doesn't seem like it either. I put a dummy optional dep under |
The
allocfeature wasn't doing anything as far as I can discern. And theprecomputed_tablesfeatures only offers speedups for Edwards mults, whichdiffie_hellman()does not do (I verified this by benchmarking on my machine).So I removed those two features and documented the rest in the README.
Resolves #699