Re: Searching for Fastest Way to Input a File
- Posted by DerekParnell (admin) May 14, 2014
- 2773 views
jimcbrown said...
DerekParnell said...
nor will files with more than (power(2,31)-1) bytes long, due to a limitation in the seek() function.
Can you elaborate on this?
Sorry. I misinformed you. It is actually a problem with the repeat() function. And the limit is "power(2,30) - 1"
repetition count must not be more than 1073741823When I corrected my example code to cater for this, I ran out of memory for large files.
d = {} while p > 1073741823 do d &= repeat(0, 1073741823) p -= 1073741823 end while d = repeat(0, p)
When I removed the actual storing of bytes, I could read files of any size (around 25MB/second)