Re: Task dispatching
Re: Task dispatching
- Subject: Re: Task dispatching
- From: Scott Ribe <email@hidden>
- Date: Tue, 13 Sep 2011 14:39:22 -0600
On Sep 13, 2011, at 2:10 PM, Jon Sigman wrote:
> So, I'm stunned that this would be so much faster than using individual fread() calls for each element.
I'm not. fread has a lot of overhead relative to reading 8 bytes. If your data structure really is just a big non-sparse n-dimension array of floating point numbers, you probably should always have been reading (& writing) it in a single call.
Note that your disk is not really providing 1.25GB/sec reads. What was probably happening is that the file contents were in system cache because of your prior reads. (Assuming that with the mmap code you were actually reading all the data...) Your first time after a reboot will probably still take 5-10 seconds at least, but that doesn't seem like it should be any problem for you.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden