Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MIPS integer Sandy Bridge

Tags:

x86

assembly

I wrote an arithmetic integer library in assembly. I would like to estimate the performance compared to the peak performance of my processor (Intel Sandy Bridge).

As integer arithmetic is performed by the 3 ALUs of the Sandy Bridge, is "3 * (number of cores) * frequency" enough to get an estimation ? 99% of my assembly is addq, adcq, mulq instructions).

like image 210
Timocafé Avatar asked Sep 13 '26 21:09

Timocafé


1 Answers

No.

There are many factors that influence the speed of any code. Things like dependencies between instructions that cause stalls, cache accesses and cache speed, cache misses and RAM speed, etc.

For Sandy Bridge specifically, there's also hyper-threading (those ALUs are shared by 2 logical CPUs) and turbo-boost and power management. Then there's paging (TLB lookup, and TLB misses).

On top of all that there's OS overhead; including things like how quickly the kernel can resolve page faults (for various "copy on write" and "allocate on write" purposes), how all work is scheduled across CPUs, how many task switches occur and how fast they are, how mutexes/futexes are handled, etc.

like image 100
Brendan Avatar answered Sep 15 '26 09:09

Brendan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!