Author Topic: a fast function to scan byte  (Read 11531 times)

jj2007

  • Member
  • *****
  • Posts: 7752
  • Assembler is fun ;-)
    • MasmBasic
Re: a fast function to scan byte
« Reply #30 on: September 06, 2012, 04:41:20 PM »
Is there somewhere a piece of code using FILE_FLAG_NO_BUFFERING ?

On the old forum.

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: a fast function to scan byte
« Reply #31 on: September 06, 2012, 06:13:51 PM »

That is just the write file , the read need virtualalloc with a number of conditions alignment in memory and on disk.
See msdn.
Fa is a musical note to play with CL

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4930
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: a fast function to scan byte
« Reply #32 on: September 06, 2012, 09:26:16 PM »
I confess I don't see what the big deal is about 77 meg, I routinely use a 1 gig buffer to test linear speed of algos (a 1 gig VOB file does fine) and as you would expect, the first time you have disk read time, the next is straight memory speed. Just isolate what you are testing, if its disk IO, clock the first instance before memory operations, if its algo speed on data in memory, clock the time AFTER the disk IO.

If you are designing a task that must read very large files (larger than memory) work out a tiling scheme, disk IO in one thread and memory ops in one or more other thread(s). If you are running Win7 64 bit with 32 bit apps, you can run a larger buffer size and with inter-app communication, you can schedule multiple instances and synchronise them to perform much larger tasks using multi-core, multi-thread designs.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: