Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Importing binary file is toooooo slow...

  • To: mathgroup at
  • Subject: [mg54198] Re: Importing binary file is toooooo slow...
  • From: Bill Rowe <readnewsciv at>
  • Date: Sun, 13 Feb 2005 00:21:29 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 2/12/05 at 1:57 AM, rob at (J. K. Smith) wrote:

>I'm using v. --

>I am importing (wrong word?) binary data from a file:

><< Utilities`BinaryFiles`

>y = ReadListBinary["filename", SignedInt16,

>The file is only 34k bytes long but it takes 16 seconds to do it.
>This isn't a slow machine so clearly I'm doing something wrong

I don't think you are doing something wrong. I also found the ReadListBinary in that package to be slow.

>I would appreciate any suggestions on how to make this thing sizzle
>as I feel sure it can.  Right now I'm dead if I have to do a big

You might try using the routines in the Experimental context. When I was using version 4, I found these routines to be faster although still slow.

Anohter approach might be to read the file in as bytes then combine pairs of bytes into integers. As I recall, the slowness of ReadListBinary seemed to be due to the conversion process.

Ulitimately, you could upgrade to version 5.1 which now has a built in function BinaryReadList which does the job and doesn't have the slowness of ReadListBinary.
To reply via email subtract one hundred and four

  • Prev by Date: Re: Newbie question
  • Next by Date: Re: Newbie question
  • Previous by thread: Re: Re: Importing binary file is toooooo slow...
  • Next by thread: Re: Importing binary file is toooooo slow...