octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54100] fread using SKIP larger than zero is e


From: anonymous
Subject: [Octave-bug-tracker] [bug #54100] fread using SKIP larger than zero is extremely slow
Date: Mon, 11 Jun 2018 14:41:32 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

URL:
  <http://savannah.gnu.org/bugs/?54100>

                 Summary: fread using SKIP larger than zero is extremely slow
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 11 Jun 2018 06:41:30 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: Gisle J Torvetjonn
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

data = single(fread(fid,[Var.no+1 nl],'single',0));
is quite speedy while 
data = fread(fid,[Var.no nl],'single',4);
is very very very slow.

Reducing Var.no and increasing the number of skips increases the speed 

data = fread(fid,[2 nl],'single',4*(Var.no-1));
takes 23.6 sec while
data = fread(fid,[1 nl],'single',4*(Var.no)); 
takes 11.6 sec while
data = single(fread(fid,[Var.no+1 nl],'single',0));
takes 0.2 sec.

(Var.no=60)

The code works fine in Matlab.
The code is intended for reading a double column in a mixed dataset . The
first row is 'double' and the rest is single. 




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 11 Jun 2018 06:41:30 PM UTC  Name: LTSpiceRaw_Fa.m  Size: 5KiB   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=44359>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54100>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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