mirror_zfs/module
Alexander Motin fc5200aa9b
AVL: Remove obsolete branching optimizations
Modern Clang and GCC can successfully implement simple conditions
without branching with math and flag operations.  Use of arrays for
translation no longer helps as much as it was 14+ years ago.

Disassemble of the code generated by Clang 13.0.0 on FreeBSD 13.1,
Clang 14.0.4 on FreeBSD 14 and GCC 10.2.1 on Debian 11 with this
change still shows no branching instructions.

Profiling of CPU-bound scan stage of sorted scrub shows reproducible
reduction of time spent inside avl_find() from 6.52% to 4.58%.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13540
2022-06-09 15:27:36 -07:00
..
avl AVL: Remove obsolete branching optimizations 2022-06-09 15:27:36 -07:00
icp Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
lua linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
nvpair linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
os zvol: Support blk-mq for better performance 2022-06-09 08:10:38 -06:00
unicode linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
zcommon Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
zfs Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
zstd Tiered early abort, zstd edition 2022-05-24 09:43:22 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
Makefile.bsd Introduce BLAKE3 checksums as an OpenZFS feature 2022-06-08 15:55:57 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00