color_quant icon indicating copy to clipboard operation
color_quant copied to clipboard

Add benchmark for neuquant

Open JulianKnodt opened this issue 2 years ago • 0 comments

There were no benchmarks for neuquant, and it's worthwhile to figure out what consumes time when quantizing the colors. This creates two benchmarks, one for the creation of the quantization, and one for the searching of the nearest color. It tests on a static image which is mostly green and red.

Current output:

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


running 2 tests
test bench_map_pixel ... bench:          50 ns/iter (+/- 21)
test bench_new_nq    ... bench:   6,385,162 ns/iter (+/- 1,435,915)

test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out; finished in 10.26s

Updates #12

Let me know what the best method would be for getting it to compile on old systems, target-features, a build script, etc.

JulianKnodt avatar Jul 27 '21 19:07 JulianKnodt