Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7482

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

From Frank Iannarilli <frankeye@cox.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Efficient way to read binary data line-by-line
Date 2011-12-30 12:14 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jdk9vn$8dn$1@smc.vnet.net> (permalink)
References <200909090846.EAA06073@smc.vnet.net> <h8d58e$167$1@smc.vnet.net>

Show all headers | View raw


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.  

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Efficient way to read binary data line-by-line Frank Iannarilli <frankeye@cox.net> - 2011-12-30 12:14 +0000

csiph-web