View Single Post
  #9  
Old 06-20-2018, 01:34
gigaman gigaman is offline
Friend
 
Join Date: Jun 2002
Posts: 87
Rept. Given: 0
Rept. Rcvd 3 Times in 2 Posts
Thanks Given: 0
Thanks Rcvd at 14 Times in 11 Posts
gigaman Reputation: 4
Does one call or jump really matter?
I mean, if you said you couldn't easily access local variables or structures, I'd agree... but "excessive call", it sounds like you are trying to optimize something. In that case inline assembler is hardly any good - it's a blackbox for the compiler (at least for the Microsoft's) so it has to dump the values from registers into local variables and after the inline assembly load them back. In other words, a piece of inline assembly heavily breaks the optimization of the surrounding C code - so it's usually not worth it, it does more damage than one call would (so it's better to write the whole CPU intensive piece of code in assembler as a separate function).
Reply With Quote
The Following User Says Thank You to gigaman For This Useful Post:
tonyweb (06-20-2018)