Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualnimrodson

Posted 17 April 2013 - 07:01 PM

Hi,

 

I've been some comparisons in C between the 4 basic arithmetic operations (+ , - , * , / ), and surprisingly (for me), add and multiply operations takes the same time: I did the work testes using int and doubles data types and it's the same thing.

Analizing the dissamble code generated by gcc (-S parameter) I noted that the opcodes used are fadd and fmul. According wikipedia, x87 FPU in Athlon 64 employs the same time processing both opcodes.

I'd like to know what is the reason of this curiosity.

 

Thanks.

 

 


#2nimrodson

Posted 17 April 2013 - 07:00 PM

EDIT: I MADE A MISTAKE: THE TITLE SHOULD BE FADD VS FMUL.

 

Hi,

 

I've been some comparisons in C between the 4 basic arithmetic operations (+ , - , * , / ), and surprisingly (for me), add and multiply operations takes the same time: I did the work testes using int and doubles data types and it's the same thing.

Analizing the dissamble code generated by gcc (-S parameter) I noted that the opcodes used are fadd and fmul. According wikipedia, x87 FPU in Athlon 64 employs the same time processing both opcodes.

I'd like to know what is the reason of this curiosity.

 

Thanks.

 

 


#1nimrodson

Posted 17 April 2013 - 06:24 PM

Hi,

 

I've been some comparisons in C between the 4 basic arithmetic operations (+ , - , * , / ), and surprisingly (for me), add and multiply operations takes the same time: I did the work testes using int and doubles data types and it's the same thing.

Analizing the dissamble code generated by gcc (-S parameter) I noted that the opcodes used are fadd and fmul. According wikipedia, x87 FPU in Athlon 64 employs the same time processing both opcodes.

I'd like to know what is the reason of this curiosity.

 

Thanks.

 

 

 


PARTNERS