
README for using hex_bench

1. download/install nasm
https://www.nasm.us/

2. download golink on windows or use other linker
http://www.godevtool.com/

3. unzip folder of hex_bench

4.a adjust the path and the hex_encode implementation if not on a AVX 512 machine
4.b adjust the path to the nasm exe in hex_bench.asm on windows

5. build the exe (see below)

6. run the benchmark and stop the time manually:
- it will run without IO for about 90 til 300? sec
- it encodes (more than a terrabyte!!)
; 1 million times = 1356 GB on windows
; 1 million times = 1718 GB on linux


BUILD commands:

%ifdef ASSEMBLE_COMMAND_LINES_ON_WINDOWS

:: commands to build on Windows (nasm and golink in the path)
nasm -f WIN64 -g hex_bench.asm     -l hex_bench.lis
nasm -f WIN64 -g hex_x86_64.asm    -l hex_x86_64.lis
nasm -f WIN64 -g HEX_BENCH_DATA_1300KB.asm
golink /console hex_bench.obj hex_x86_64.obj HEX_BENCH_DATA_1300KB.obj

%endif

%ifdef ASSEMBLE_COMMAND_LINES_ON_LINUX

# commands to build on LINUX without gdb symbols
nasm -f elf64 -g hex_bench.asm     -l hex_bench.lis
nasm -f elf64 -g hex_x86_64.asm    -l hex_x86_64.lis
nasm -f elf64 -g HEX_BENCH_DATA_1300KB.asm
ld -o hex_bench hex_bench.o hex_x86_64.o HEX_BENCH_DATA_1300KB.o

# commands to build on LINUX with gdb symbols
nasm -f elf64 hex_bench.asm -g -F stabs    -l hex_bench.lis
nasm -f elf64 hex_x86_64.asm -g -F stabs   -l hex_x86_64.lis
nasm -f elf64 HEX_BENCH_DATA_1300KB.asm -g -F stabs
gcc -o hex_bench hex_bench.o hex_x86_64.o HEX_BENCH_DATA_1300KB.o -g

%endif

