[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34363] Poor performance for certain statistic
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #34363] Poor performance for certain statistical distributions |
Date: |
Mon, 12 Oct 2015 04:25:59 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1) |
Follow-up Comment #13, bug #34363 (project octave):
I reviewed and checked in binoinv.m
(http://hg.savannah.gnu.org/hgweb/octave/rev/9d2023d1a63c) and nbininv.m
(http://hg.savannah.gnu.org/hgweb/octave/rev/d6d04088ac9e). I had to update
some of the code to follow Octave coding conventions. In particular, using a
space after a function and before the opening parenthesis as in "sin (x)"
rather than "sin(x)". The new BIST tests also didn't run at first and
required some debugging.
The speed-up for binoinv was 28X and an incredible 85X for nbininv.
For gaminv and betainv, I re-wrote these to use do-until loops with a maximum
loop count of 40, rather than 10,000. If the results ever do fail to converge
within 40 cycles a warning will be issued. But at least these won't "hang"
anymore while looping from 40 to 10,000.
I'll leave this bug report open for the hygeXXX.m functions which remain.
As an example,
octave:13> x = rand (100, 1);
octave:14> tic; y = hygeinv (x, 100*ones (size (x)), 30, 20); toc
Elapsed time is 0.839279 seconds.
octave:15> tic; y2 = hygeinv (x, 100, 30, 20); toc
Elapsed time is 0.00971079 seconds.
which shows that the scalar case is much, much faster than the vector case.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34363>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #34363] Poor performance for certain statistical distributions,
Rik <=