This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: GPL-2.0-or-later OR MIT | |
# | |
# how to build this: | |
# | |
# $ as -o check-new-world.tiny.o check-new-world.tiny.s | |
# $ ld check-new-world.tiny.o -o check-new-world.tiny.tmp | |
# $ objcopy -O binary --only-section=.blob ./check-new-world.tiny.tmp ./check-new-world.tiny | |
.section ".blob", "aw", @progbits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-2.0-or-later | |
/* | |
$ gcc -O3 -o linux-xor-simd-test linux-xor-simd-test.c | |
$ ./linux-xor-simd-test | |
ref (size=4096 ) passed 16383 times: 0.005044150 s total, 0.000000307 s per pass, 12687.191 MiB/s | |
lsx_32b (size=4096 ) passed 16383 times: 0.002663250 s total, 0.000000162 s per pass, 24029.323 MiB/s | |
lsx_64b (size=4096 ) passed 16383 times: 0.002517970 s total, 0.000000153 s per pass, 25415.749 MiB/s | |
lsx_128b (size=4096 ) passed 16383 times: 0.002517590 s total, 0.000000153 s per pass, 25419.585 MiB/s | |
lasx_32b (size=4096 ) passed 16383 times: 0.001935550 s total, 0.000000118 s per pass, 33063.519 MiB/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
// Ever wondered how the wicked logic in https://github.com/llvm/llvm-project/blob/6084ee742064cf8/lld/ELF/Arch/LoongArch.cpp#L86-L169 | |
// got discovered? This is the experiment I've done... | |
#include <cstdio> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <unistd.h> |
OlderNewer