]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Allow better optimization
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 16 Oct 2024 14:55:43 +0000 (16:55 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 18 Oct 2024 19:00:27 +0000 (14:00 -0500)
commit557e79c360a304ab22c2a81daff440f4e052a1a0
tree368cf98e34df87dd3d3d6a691c49a42efa9cf189
parente41e2c471912fe8bbeab7ad67357a1a6308ad2ed
libkmod: Allow better optimization

If we have native endianess, i.e. parsing modules for the running
system, assist the compiler to note that it is really much faster to
move a word/qword etc. instead of actually running through a loop.

Reduces library instructions on x86_64 by 1.4 % and binary instructions
by 3 % with default configuration.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/187
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-elf.c