[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How much time to count from 1 to 1e7?
From: |
Denis Pelletier |
Subject: |
How much time to count from 1 to 1e7? |
Date: |
Wed, 8 Aug 2001 22:21:12 -0400 (EDT) |
Hello,
I started playing with Octave in the last few weeks. I'm presently running
Octave 2.1.34 on an AMD K7 1.2 GHz. I do most of my work with Gauss.
I'm trying to have a feel of how fast Octave is. I made simple programs in
Octave and Gauss to compare both. In many cases, Octave is faster (e.g.
computing the inverse of a matrix). But the "while" command of Octave
seems pretty slow compare to the one in Gauss. With Octave the following
program takes 146 seconds:
i=1;
tic;
while (i <= 1e7)
++i;
endwhile
toc
The equivalent program in Gauss takes 12 seconds.
Am I doing something wrong? Is there a way to speed up Octave? An
optimization flag when compiling Octave?
Since my typical program use the "while" command (maximizing a
log-likelihod with the BFGS algorithm) it run a lot slower in Octave.
For numerous reasons I want to ditch Gauss. I would be very happy if I
could replace it with Octave.
Thanks.
Denis
_______________________________________________
Denis Pelletier
Étudiant au doctorat
sciences économiques, Université de Montréal
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- How much time to count from 1 to 1e7?,
Denis Pelletier <=