Re: Committing Byte Array to Disk
Use BinaryWriter instead.
bw.write(MB)
"guy" <guy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2D04CF28-BE5C-462F-B389-68133E2515BF@xxxxxxxxxxxxxxxx
suggest you move the StreamWriter.Flush outside the loop
"jwgoerlich@xxxxxxxxx" wrote:
What is the fastest way of writing a Byte array to disk? I have a 512
MB array in memory. I am writing to a 10K RPM drive, and have ample CPU
and RAM. I need to write as much data as possible, as fast as possible.
Currently, I am using the StreamWriter. I am not getting anywhere near
the thru put I would expect. My code is something like:
For i = 0 To (MB.Length - 1)
StreamWriter.Write(MB(i))
StreamWriter.Flush()
Next
Any recommendations on squeezing more performance?
J Wolfgang Goerlich
.
Relevant Pages
- Re: running Linux with no swap space (but lots of RAM)
... Some amount of caching is necessary to achieve such I/O scheduling. ... The amount of memory allocated to ... Someone who thinks writing to /dev/null would result in lots of data being ... TB of RAM and fits in an ATX case using no more than 550 watts of power. ... (comp.os.linux.development.system) - Re: running Linux with no swap space (but lots of RAM)
... The buffering logic ... | into memory. ... Reading is does not create the same situation as writing out. ... By that time a huge amount of RAM is ... (comp.os.linux.development.system) - Re: disk file reads slow down for file sizes greater than 2 GB
... the same one I've been chasing for several days now on a Windows XP ... the available RAM is reduced by the ... GlobalMemoryStatus at various points and writing the result to a text file. ... After all the available RAM is consumed by the write operations, memory ... (comp.lang.fortran) - Re: Steve Jobs demos Macintosh in 1984
... Woody wrote: ... Stop annoying the fucking hell out of me, ... For sure not much computer memory had been made in 1948 - but it could ... For sure you got a bit more RAM to use in the Speccy - ... (uk.comp.sys.mac) - Re: Windows uses 4 GB? Really?
... I bought 4 GB of RAM because I thought it would speed up my system a bit. ... Some info that is posted here as reference seems to suggest that it is a Windows issue, but others seem to suggest that it is also a hardware issue. ... "I have install total 4GB memory on my motherboard. ... On a SLI system, since PCI-Ex graphic cards will occupy around 256MB, another 256MB will be occupied after you install a 2nd PCI-Ex graphic card. ... (microsoft.public.windowsxp.general) |
|