diff --git a/.github/workflows/Basic.yml b/.github/workflows/Basic.yml index 1188d7b..38ac3ce 100644 --- a/.github/workflows/Basic.yml +++ b/.github/workflows/Basic.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - bls_lib: [zkcrypto, arkworks] + bls_lib: [zkcrypto, arkworks, arkworks-asm] steps: - name: Checkout sources uses: actions/checkout@v2 diff --git a/Cargo.toml b/Cargo.toml index 5098ca1..c404e93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ crate-type = ["cdylib", "rlib"] [features] js = ["hex", "wasm-bindgen"] arkworks = ["ark-bls12-381", "ark-ec", "ark-ff", "ark-serialize", "sha2_v10"] +arkworks-asm = ["arkworks", "ark-ff/asm"] zkcrypto = ["pairing", "bls12_381", "sha2_v9"] default = ["zkcrypto"] diff --git a/README.md b/README.md index f2d6811..c8bc360 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,9 @@ cargo +nightly bench bench_ --no-default-features --features zkcrypto # Using arkworks cargo +nightly bench bench_ --no-default-features --features arkworks + +# Using arkworks(+asm) (see https://hackmd.io/@gnark/eccbench) +cargo +nightly bench bench_ --no-default-features --features arkworks-asm ``` Results on an Apple M1 Pro with Rust 1.72.0-nightly: @@ -115,6 +118,7 @@ Results on an Apple M1 Pro with Rust 1.72.0-nightly: | ------------------ | --------------- | -------- | | zkcrypto | 1.956 ms | 1.489 ms | | arkworks | 1.714 ms | 1.425 ms | +| arkworks(+asm) | 1.712 ms | 1.424 ms | ## License