mirror_zfs/lib/libzfs
Shengqi Chen 0ae4460c61 zcommon: add specialized versions of cityhash4
Specializing cityhash4 on 32-bit architectures can reduce the size
of stack frames as well as instruction count. This is a tiny but
useful optimization, since some callers invoke it frequently.

When specializing into 1/2/3/4-arg versions, the stack usage
(in bytes) on some 32-bit arches are listed as follows:

- x86: 32, 32, 32, 40
- arm-v7a: 20, 20, 28, 36
- riscv: 0, 0, 0, 16
- power: 16, 16, 16, 32
- mipsel: 8, 8, 8, 24

And each actual argument (even if passing 0) contributes evenly
to the number of multiplication instructions generated:

- x86: 9, 12, 15 ,18
- arm-v7a: 6, 8, 10, 12
- riscv / power: 12, 18, 20, 24
- mipsel: 9, 12, 15, 19

On 64-bit architectures, the tendencies are similar. But both stack
sizes and instruction counts are significantly smaller thus negligible.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes #16131
Closes #16483
2024-09-19 15:18:59 -07:00
..
os Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN. 2024-05-10 08:47:21 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c Add '-u' - nomount flag for zfs set 2023-10-02 16:58:54 -07:00
libzfs_config.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
libzfs_crypto.c libzfs: use zfs_strerror() in place of strerror() 2024-01-29 09:54:57 -08:00
libzfs_dataset.c Overflowing refreservation is bad 2024-04-29 11:32:49 -07:00
libzfs_diff.c libzfs: use zfs_strerror() in place of strerror() 2024-01-29 09:54:57 -08:00
libzfs_impl.h ddt: add support for prefetching tables into the ARC 2024-07-26 09:16:18 -07:00
libzfs_import.c Fix "out of memory" error 2024-01-12 12:35:29 -08:00
libzfs_iter.c libzfs: add v2 iterator interfaces 2023-04-10 11:53:02 -07:00
libzfs_mount.c Better control the thread pool size when mounting datasets 2024-05-14 09:36:21 -07:00
libzfs_pool.c Add DDT prune command 2024-09-04 14:17:02 -07:00
libzfs_sendrecv.c Fix printf typo for zfs receive -cv (#16295) 2024-07-17 17:18:12 -07:00
libzfs_status.c nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
libzfs_util.c JSON output support for zpool get 2024-08-06 12:47:00 -07:00
libzfs.abi zcommon: add specialized versions of cityhash4 2024-09-19 15:18:59 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am value strings: pretty printers for flags and enums 2024-09-05 13:40:05 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00