You're right -- I ran a new test with a different 1GB matrix file, and the 
first time that it is mmap'd it takes approx 30 seconds; afterwards < 1 second 
to map to (and loop through) what I suppose is an already cached image. I did 
verify that the data is there (it's a read-only dense matrix). Still, this 
should work out, since after the initial mmap load, it's quite speedy.


________________________________
From: Scott Ribe <scott_r...@elevated-dev.com>
To: Steve Sisak <sgs-li...@codewell.com>
Cc: Jon Sigman <rf_...@yahoo.com>; list-cocoa-dev <cocoa-dev@lists.apple.com>
Sent: Tuesday, September 13, 2011 2:55 PM
Subject: Re: Task dispatching

On Sep 13, 2011, at 3:28 PM, Steve Sisak wrote:

> Actually, I believe that mmap just maps the the file into memory using the VM 
> system -- it's initially paged out and read in as each page is touched...

Yes, thus my comment. Did the OP actually read all values? The time seems too 
fast for that unless everything was cached. But on the other hand the time 
seemed way too slow to just be the mmap call itself without actually reading 
data.


-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to