octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48736] Multiplication is thrice as fast as di


From: anonymous
Subject: [Octave-bug-tracker] [bug #48736] Multiplication is thrice as fast as division
Date: Wed, 10 Aug 2016 12:13:09 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0

Follow-up Comment #2, bug #48736 (project octave):

The computational complexity of the division operator is higher than the
multiplication operator. See the link


https://en.wikipedia.org/wiki/Computational_complexity_of_mathematical_operations
 

Further the link


https://gmplib.org/~tege/x86-timing.pdf


shows that there is about a factor of 5 difference in the number of cycles for
scalr division and multiplication.

Ok, perhaps Octave should be expanding


x /= n


as

x *= 1/n
-varbatim-

but I suspect that this would not be as accurate. What as the matlab times in
this case ?

D.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48736>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]