3 ms·
Benchmarking Division and Libdivide on Apple M1 and Intel AVX512 (2021)
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- Lockal 2y agoNote that libdivide may sound like an improvement, however there are better solutions today: 1) full-blown compiler/engines like LLVM or GCC build close to optimal shift/mul-based code (without overhead for simple constants like "2") 2) if one can't include LLVM, there are lightweight libraries like xbyak or asmjit, where one can implement optimal jit solution. See https://github.com/herumi/xbyak/blob/80477f635345e8f13efc512d84b01b94cad92cd9/sample/quantize.cpp https://github.com/herumi/xbyak/blob/80477f635345e8f13efc512... as a starting point.