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.
build failing · Windows x64 objects, AVX2
Fuzz the AVX2 version against the scalar one
Steps
assemble the scalar reference
nasm -f win64 -o build/utf8_scalar.obj src/utf8_scalar.asm
0 ms
nasm is not installed on this build host.
assemble AVX2
nasm -f win64 -o build/utf8_avx2.obj src/utf8_avx2.asm
0 ms
nasm is not installed on this build host.
build the tests
gcc -O2 -Wall -o build/test.exe test/test.c build/utf8_scalar.obj build/utf8_avx2.obj
0 ms
gcc is not installed on this build host.
table 3-7, then 1,000,000 fuzzed inputs
./build/test.exe 1000000
windows
0 ms
No windows runner is attached to this build host.
build the benchmark
gcc -O2 -Wall -o build/bench.exe bench/bench.c build/utf8_scalar.obj build/utf8_avx2.obj
0 ms
gcc is not installed on this build host.
time both on 64 MiB
./build/bench.exe
windows
0 ms
No windows runner is attached to this build host.
Artifacts
build/utf8_avx2.obj
not produced · build/utf8_avx2.obj was not produced by the build
build/utf8_scalar.obj
not produced · build/utf8_scalar.obj was not produced by the build