← Back to team overview

yade-dev team mailing list archive

CPU cost of various arithmetic operations

 

FYI this is a file that evaluates cost of various ops when optimizing
(for i386):

http://repo.or.cz/w/official-gcc.git/blob/trunk:/gcc/config/i386/i386.c

It is grouped by processor models; interesting is that (for core2
family) sqrt costs 58, float division 32 (!), float multiplication 5
(for AMD k8 processors, it is 35 for sqrt and 19 for fdiv).  (that
doesn't mean that you should rewrite * to /, gcc is smart enough to
precompute if used multiple times)

Cheers, v.






Follow ups