UTF-8 validation in x86-64: a scalar reference and an AVX2 version that checks 32 bytes per step. Every build fuzzes one against the other.
3[project]
4isa = "x86-64"
5assembler = "nasm"
8[[step]]
9name = "assemble the scalar reference"
10run = ["nasm", "-f", "win64", "-o", "build/utf8_scalar.obj", "src/utf8_scalar.asm"]
13name = "assemble AVX2"
14run = ["nasm", "-f", "win64", "-o", "build/utf8_avx2.obj", "src/utf8_avx2.asm"]
17name = "build the tests"
AVX2: three nibble tables and a saturating subtractAug 4
18run = ["gcc", "-O2", "-Wall", "-o", "build/test.exe", "test/test.c", "build/utf8_scalar.obj", "build/utf8_avx2.obj"]
20[[step]]
Fuzz the AVX2 version against the scalar oneAug 5
21name = "table 3-7, then 1,000,000 fuzzed inputs"
24expect = "0 mismatches"
27name = "build the benchmark"
AVX2: three nibble tables and a saturating subtractAug 4
28run = ["gcc", "-O2", "-Wall", "-o", "build/bench.exe", "bench/bench.c", "build/utf8_scalar.obj", "build/utf8_avx2.obj"]
30[[step]]
33run = ["./build/bench.exe"]
34expect = "MiB of mixed text"
38paths = ["build/utf8_scalar.obj"]