Skip to content

Commit

Permalink
Update benchmark results
Browse files Browse the repository at this point in the history
Signed-off-by: Anjan Roy <[email protected]>
  • Loading branch information
itzmeanjan committed Feb 23, 2025
1 parent 76b1ef4 commit 296b10f
Show file tree
Hide file tree
Showing 3 changed files with 954 additions and 3,981 deletions.
49 changes: 20 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Few of those places, where I've already used `sha3` as ( git submodule based ) d
> [!WARNING]
> Above list may not be up-to-date !
Here I'm maintaining a zero-dependency, header-only C++ library, using modern C++ features ( such as C++{>=11} ), which is fairly easy-to-use in your project, implementing SHA3 [specification](https://dx.doi.org/10.6028/NIST.FIPS.202) i.e. NIST FIPS PUB 202.
Here I'm maintaining a zero-dependency, header-only C++ library, using modern C++ features ( such as C++{>=11} ), which is fairly easy-to-use in your project, implementing SHA3 [specification](https://dx.doi.org/10.6028/NIST.FIPS.202) i.e. NIST FIPS PUB 202.

> [!NOTE]
> All Sha3 hash functions and xofs are implemented as `constexpr` functions - meaning for any statically defined input message these functions can be evaluated in compile-time in constant-expression context. See [tests](./tests).
Expand Down Expand Up @@ -94,24 +94,24 @@ CXX=clang++ make test -j

```bash
PASSED TESTS (18/18):
3 ms: build/test/test.out Sha3Xof.CompileTimeEvalShake256
1 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_384
1 ms: build/test/test.out Sha3Xof.CompileTimeEvalShake256
1 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_512
2 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_256
2 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_224
4 ms: build/test/test.out Sha3Xof.CompileTimeEvalShake128
12 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_224
13 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_256
13 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_512
16 ms: build/test/test.out Sha3Hashing.CompileTimeEvalSha3_384
18 ms: build/test/test.out Sha3Hashing.Sha3_224IncrementalAbsorption
18 ms: build/test/test.out Sha3Hashing.Sha3_256IncrementalAbsorption
19 ms: build/test/test.out Sha3Hashing.Sha3_384IncrementalAbsorption
19 ms: build/test/test.out Sha3Hashing.Sha3_512IncrementalAbsorption
21 ms: build/test/test.out Sha3Hashing.Sha3_384KnownAnswerTests
21 ms: build/test/test.out Sha3Hashing.Sha3_224KnownAnswerTests
21 ms: build/test/test.out Sha3Xof.Shake128KnownAnswerTests
21 ms: build/test/test.out Sha3Hashing.Sha3_256KnownAnswerTests
22 ms: build/test/test.out Sha3Hashing.Sha3_512KnownAnswerTests
22 ms: build/test/test.out Sha3Xof.Shake256KnownAnswerTests
1078 ms: build/test/test.out Sha3Xof.Shake128IncrementalAbsorptionAndSqueezing
1159 ms: build/test/test.out Sha3Xof.Shake256IncrementalAbsorptionAndSqueezing
5 ms: build/test/test.out Sha3Hashing.Sha3_256KnownAnswerTests
6 ms: build/test/test.out Sha3Hashing.Sha3_224IncrementalAbsorption
7 ms: build/test/test.out Sha3Hashing.Sha3_512KnownAnswerTests
7 ms: build/test/test.out Sha3Xof.Shake128KnownAnswerTests
7 ms: build/test/test.out Sha3Hashing.Sha3_224KnownAnswerTests
7 ms: build/test/test.out Sha3Hashing.Sha3_512IncrementalAbsorption
7 ms: build/test/test.out Sha3Hashing.Sha3_256IncrementalAbsorption
7 ms: build/test/test.out Sha3Hashing.Sha3_384KnownAnswerTests
8 ms: build/test/test.out Sha3Xof.Shake256KnownAnswerTests
8 ms: build/test/test.out Sha3Hashing.Sha3_384IncrementalAbsorption
1028 ms: build/test/test.out Sha3Xof.Shake128IncrementalAbsorptionAndSqueezing
1112 ms: build/test/test.out Sha3Xof.Shake256IncrementalAbsorptionAndSqueezing
```

## Benchmarking
Expand All @@ -131,25 +131,16 @@ make benchmark -j # Else you have to issue this one.

### On 12th Gen Intel(R) Core(TM) i7-1260P

Compiled with `g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0` while running on `Linux 6.11.0-9-generic x86_64`.
Compiled with `g++ (Ubuntu 14.2.0-4ubuntu2) 14.2.0` while running on `Linux 6.11.0-18-generic x86_64`.

I maintain benchmark results in JSON format @ [bench_result_on_Linux_6.11.0-9-generic_x86_64_with_g++_14](./bench_result_on_Linux_6.11.0-9-generic_x86_64_with_g++_14.json).
I maintain benchmark results in JSON format @ [bench_result_on_Linux_6.11.0-18-generic_x86_64_with_g++_14](./bench_result_on_Linux_6.11.0-18-generic_x86_64_with_g++_14.json).

### On Apple M1 Max

Compiled with `Apple Clang version 16.0.0` while running kernel `Darwin 24.1.0 arm64`.

Maintaining benchmark results in JSON format @ [bench_result_on_Darwin_24.1.0_arm64_with_c++_16.0.0](./bench_result_on_Darwin_24.1.0_arm64_with_c++_16.0.0.json).

### On AWS EC2 Instance `c8g.medium` i.e. ARM Neoverse-V2

Compiled with `g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0 ` while running on `Linux 6.8.0-1016-aws aarch64`.

I maintain benchmark results in JSON format @ [bench_result_on_Linux_6.8.0-1016-aws_aarch64_with_g++_13](./bench_result_on_Linux_6.8.0-1016-aws_aarch64_with_g++_13.json).

> [!NOTE]
> More about AWS EC2 instances @ https://aws.amazon.com/ec2/instance-types/c8g.
## Usage

`sha3` - C++ header-only library is written such that it's fairly easy for one to start using it in their project. All one needs to do
Expand Down
Loading

0 comments on commit 296b10f

Please sign in to comment.