MathGroup Archive 2011

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

Search the Archive

Re: Efficient way to read binary data line-by-line

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123919] Re: Efficient way to read binary data line-by-line
  • From: Frank Iannarilli <frankeye at cox.net>
  • Date: Fri, 30 Dec 2011 07:06:21 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <200909090846.EAA06073@smc.vnet.net> <h8d58e$167$1@smc.vnet.net>
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Leonid is spot-on with the sequential nature of BinaryReadList.

But BinaryRead is EXTREMELY inefficient compared to BinaryReadList (at least for version 8.0.1).  I just took a look at why, and it is apparently because the result from BinaryRead is NOT in PackedArray format (per `Developer`PackedArrayQ), even for a 65K-sized read request. 

OTOH, BinaryReadList returns a payload as a PackedArray, which implies its conversions from Bytes to requested type will be MUCH faster.  



  • Prev by Date: Re: Function calling another function that uses NSolve - can't get this
  • Next by Date: Follow point in AVI
  • Previous by thread: Mechanics of Materials and Structural Mechanics on Mathematica
  • Next by thread: Follow point in AVI