help-octave
[Top][All Lists]
Advanced

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

Re: speed of fread in octave


From: Peter Cloetens
Subject: Re: speed of fread in octave
Date: Tue, 13 Jun 2006 20:17:22 +0200

We are using version 2.1.71.
The platform is Linux Suse 8.2 , Suse 9.0 or RHEL4 on Xeon or Opteron CPU's.
I didn't notice a significant difference between the different OS / cpu combinations.

We are calling fread inside functions and scripts, but even in its simplest form the speed difference is obvious.
I would not call it a bug, but a performance issue.

For example:
in octave:
address@hidden:PZ> fid=fopen('ref0000_0000.edf','rb');
address@hidden:PZ> readedfheader(fid);
address@hidden:PZ> tic;fread(fid,1748*2048,'uint16');toc
ans = 0.53232

in matlab:
>> fid=fopen('ref0001_0000.edf','rb');
>> readedfheader(fid);
>> tic;fread(fid,1748*2048,'uint16');toc
Elapsed time is 0.049493 seconds.

Thanks,
Peter
 
On Jun 13, 2006, at 7:48 PM, John W. Eaton wrote:

On 13-Jun-2006, Peter Cloetens wrote:

| I start to use Octave for many things (if not all) instead of Matlab.
| However, I noticed a significant difference in speed for the command  
| fread.
| Reading with Octave is rather fast (9 MB/s) but much slower than  
| Matlab: factor 3-4.
| Is there any way to read binary uint16 data faster into Octave?
| For many other things I noticed that Octave is actually faster than  
| Matlab (typically 20-30%).

What version of Octave are you using.  On what platform?  How was it
compiled?  Precisely how are you calling the fread function?

If you think you have found a bug in Octave, then please submit a
complete bug report to the address@hidden list.  If you aren't sure
what to include in the report so that it is useful, then please read
http://www.otave.org/bugs.html before sending your report.

jwe


Peter Cloetens
ESRF
BP 220
F-38043 Grenoble
tel  : + 33 (0)4 76 88 26 50
fax : + 33 (0)4 76 88 27 85



reply via email to

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