Skip to content

Revive micro-benchmarks for vector functions#571

Merged
blapie merged 3 commits intoshibatch:masterfrom
joanaxcruz:joaxcru/micro-bench-revival
Aug 29, 2024
Merged

Revive micro-benchmarks for vector functions#571
blapie merged 3 commits intoshibatch:masterfrom
joanaxcruz:joaxcru/micro-bench-revival

Conversation

@joanaxcruz
Copy link
Copy Markdown
Contributor

@joanaxcruz joanaxcruz commented Aug 28, 2024

What is the purpose of this pull request?

Check if existent micro benchmark program is working.
The micro benchmark system in place would compile and run hitting no errors, however, the execution time returned for every function seemed flatlined at 2ns (as described in #445). Turns out the function call was being optimized away during its benchmark.
Updated program with relevant changes to prevent this.

What changes did you make?

Store the result of the function call during the benchmark, which prevents the compiler from removing the function call. Also added a warm up call.

Does this PR relate to any existing issue?

This PR should fix #445 and relates to issue #9.

joanaxcruz and others added 3 commits August 28, 2024 10:26
Store the result of the function call during its benchmark
to prevent it from being optimized away.
Also changed name of NITER1 and NITER2 macros to more obvious
acronymes.
Tested on aarch64 and x86 so far.
@blapie blapie merged commit 93f04d8 into shibatch:master Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do I check if my build flag is optimize?

2 participants