Benchmark suite for assessing the performance and correctness of assembly code produced by the jasmin-lang compiler.
- Categorized benchmarks under:
blockcipher/(AES, DES…)hash/(SHA-256, MD5…)mac/(HMAC…)streamcipher/(RC4…)
- Automatic discovery of
.jasmsources - Two-step pipeline:
- Compile
.jasm→.sviajasmc - Assemble & link
.s→ native executable viagccorclang
- Compile
- Simple
make build/make cleanworkflow
jasmin-langcompiler (jasmcon your$PATH)- GNU Make
- A native assembler & linker (e.g.
gccorclang)
Verify tools are installed:
$ which jasmc
/usr/local/bin/jasmc
$ which gcc
/usr/bin/gccJasmin-assembly-benchmark/
├── src/
│ ├── blockcipher/
│ │ ├── aes.jasm
│ │ └── des.jasm
│ ├── hash/
│ │ ├── sha256.jasm
│ │ └── md5.jasm
│ ├── mac/
│ │ └── hmac.jasm
│ └── streamcipher/
│ └── rc4.jasm
├── build/
│ ├── blockcipher/
│ ├── hash/
│ ├── mac/
│ └── streamcipher/
├── Makefile
└── README.md
- Place your
.jasmbenchmarks insrc/<category>/. - Build artifacts (
.sand executables) appear under the mirroredbuild/tree.
# Build all benchmarks:
make build
# Clean & rebuild from scratch:
make rebuild
# Remove all build artifacts:
make cleanAfter make build, each benchmark can be run directly.
Example:
# Run the AES block‐cipher benchmark
./build/blockcipher/aes
# Run the SHA-256 hash benchmark
./build/hash/sha256- Drop your new
foo.jasminto the appropriatesrc/<category>/folder. - Ensure it defines a
_startormainentry point as perjasmin-langconventions. - Re-run
make build— your new benchmark will be compiled & linked automatically.
Distributed under the MIT License. See LICENSE for details.