[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45507] acos returns different results on big
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45507] acos returns different results on big input values |
Date: |
Wed, 03 Feb 2016 21:58:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #13, bug #45507 (project octave):
The acos routine for a single numeric value is called numel() times when acos
is calculated over an array. It seems that the function has grown
significantly more complex (no pun intended). This may only be appearances
because the single math expression is now calculated in distinct sections with
flow control between the sub-calculations. Regardless, one thing to do is
benchmark Octave performance before and after the patch. As a quick test, I
used
x = 1e20*rand (1e3,1e3,20) - 5e19;
save -binary bm.var x
tic; y = acos (x); toc
I saved the test values so I could use the exact same numbers before and after
the patch was applied. I ran the tic/toc test 4 times and discarded the most
extreme value to leave 3 samples.
mean execution time pre-patch = 1.4642
mean execution time post-patch = 2.2985
percentage change = +56%
This is obviously going through a slow path in the code because if I use
x = rand (1e3,1e3,15);
and re-test then the results are equivalent.
Is there a way to improve the performance of the slow path? Or does it just
not matter all that much because extremely large inputs to acos may occur, but
are rare events?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45507>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, John W. Eaton, 2016/02/03
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values,
Rik <=
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Marco Caliari, 2016/02/04
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Rik, 2016/02/04
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Michael Godfrey, 2016/02/04
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Mike Miller, 2016/02/04
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Michael Godfrey, 2016/02/04
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, John W. Eaton, 2016/02/09
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values, Michael Godfrey, 2016/02/09