# Improve crypto benchmarks · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b8729ca1a07863a0413b90206b82c1a0794abbd5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b8729ca1a07863a0413b90206b82c1a0794abbd5

Requested commit: b8729ca1a07863a0413b90206b82c1a0794abbd5

Commit: b8729ca1a07863a0413b90206b82c1a0794abbd5

Tree: 87f3aacf2b015c545367135fe4b4cc3326cad457

Author: Frank Denis

Committer: Frank Denis

## Message

```
Improve crypto benchmarks

- 1MiB objects on the stack doesn't play well with wasmtime.
Reduce these to 512KiB so that the webassembly benchmarks can run.
- Pass expected results to a blackBox() function. Without this, in
release-fast mode, the compiler could detected unused return values,
and would produce results that didn't make sense for siphash.
- Add AEAD constructions to the benchmarks.
- Inline chacha20Core() makes it 4 times faster.
- benchmarkSignatures() -> benchmarkSignature() for consistency.

```

## Parents

- [3abf9e1457ed9332474ab211eb8d996d594a33c3](https://git.cafe/gitcafe/zig/commit/3abf9e1457ed9332474ab211eb8d996d594a33c3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b8729ca1a07863a0413b90206b82c1a0794abbd5?format=markdown)
