Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intel Assembler optimization

I'm currently trying to optimize the code emitted from a home-made compiler, for a home-made language.

I've tried out Intel VTune to see where the bottlenecks are: http://www.imada.sdu.dk/~sorenh07/misc/vtune-assembly-optimization.png

I find it very impressive that a "subl"-instruction is responsible for over 38% of the clockticks in a program running for 30-90 seconds! Can anybody give an explanation why?

The "optimization report" feature in VTune apparently doesn't exist for programs not compiled with icc. Does there exist a program which suggests optimization for assembler code? (that is, not code coming from a high-level language).

like image 747
Søren Haagerup Avatar asked Jul 04 '26 02:07

Søren Haagerup


1 Answers

My guess is that it's the idivl instruction that's actually taking up the 38%...division taking longer makes a bit more sense than subtraction no?

like image 100
foxwoods Avatar answered Jul 07 '26 05:07

foxwoods



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!