I checked: the mystery of fast JIT sorting is solved.
It's not about memory access — C++ handles that very well.
The key is function inlining. C++ does inline functions, but not recursive ones.
JIT inlines recursive functions for specific cases — e.g., for 5
million elements.
As an example: Java co
Dear GCC developers,
I would like to ask whether there might be room for improvement in memory
access optimization in GCC.
I've prepared a simple benchmark in both C++ (using -std=c++20 for digit
separators like 5'000'000) and Java. The benchmark allocates a large array of
random integers, perfor
I see it in godbolt
GCC compiles to:
movsx eax, BYTE PTR [rdi+2]
cmp al, 9
ja .L42
Clang:
movzx edx, byte ptr [rdi + 2]
cmp edx, 9
ja .LBB0_40
GCC extend with sign, Clang with zero.
cmp with 32 bit register is apparently faster than 8bit
pon., 24 kwi 2023 o 17:34 Basile Starynkevitch
napisał(a)