Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Benchmarking Division and Libdivide on Apple M1 and Intel AVX512 (2021) (ridiculousfish.com)
6 points by fanf2 on June 5, 2024 | hide | past | favorite | 1 comment


Note 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/80477f635345e8f13efc512... as a starting point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: