Henrique Bucher

Results 29 comments of Henrique Bucher

@aerosayan You could start with an array of ints with a small size, say 4 elements containing and create a sequence of indices that allow you to iterate randomly through...

Just a note. There are special cases for GCC but even applying the same rules for clang, it still optimizes away. https://godbolt.org/z/KTW4sf6P9

It looks like just doing something with the passed variable prevents GCC from optimizing it. GCC seems to sense that the generated assembly is empty. https://godbolt.org/z/esd8hE6T9 This works: ``` template...

libpfm4 already supports some ``` - For ARM: ARMV7 Cortex A8 ARMV7 Cortex A9 ARMV7 Cortex A15 ARMV8 Cortex A57, A53 Applied Micro X-Gene Qualcomm Krait Fujitsu A64FX Arm Neoverse...

DoNotOptimize is (likely) working fine. The issue is that the sum is being computed with a straight formula `N*(N-1)/2` instead of a loop. You can see [here Godbolt](https://godbolt.org/z/9T767YEM4) that even...

Oh the irony. Rust devs improving Rust benchmarks by using a library written in C. No shame.

If I just run make with no CPPFLAGS or CXXFLAGS on an AMD Threadripper 3960X, it compiles most files with default settings (no arch) but those are issued: ``` g++...

This is the way shared libraries work. The registration symbol is emitted but it's not brought into the executable since by default static libraries's symbols are optional, which on shared...

Optionally, if you are using CMake newer than 3.12, you could use OBJECT libraries. This also works: ``` add_library( libbench OBJECT bench.cpp) ```

If the divisors are fixed, or at least computed at the start of the process, we could calculate the constants for the Granlund-Montgomery division algorithm, which is just a couple...