[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nchoosek
From: |
Jaroslav Hajek |
Subject: |
nchoosek |
Date: |
Wed, 10 Dec 2008 13:40:29 +0100 |
hi,
following a recent discussion of recursion problems with nchoosek, I
reimplemented it using a recursionless, significantly faster
algorithm, see <http://hg.savannah.gnu.org/hgweb/octave/rev/343f0fbca6eb>.
A test calculation of nchoosek (1:25, 10) shows 6.5 minutes with the
old version vs. 1.1 seconds with the new implementation (intel Core 2
Duo @ 2.8GHz). I wonder how this compares to Matlab (nah, I don't
enjoy beating Matlab at benchmarks).
regards
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- nchoosek,
Jaroslav Hajek <=