Difficulties With Efficient Large File Parsing

Great point I hadn't even considered - future self thanks you for solving an issue that would have stumped me later on down the road. Thanks to both of you! :smiley:

I'm actually trying to find more info about memory mapping files in Swift, but it seems that mmap is perhaps undocumented? I found some stuff from 2011 which is preswift - and the digging into the definition in XCode it looks to be straight C? (edit: didn't realise it was a system call)

Not even quite sure how to approach writing throw conditions for try handleErrors(...) without trial and error. Any tips on finding documentation for this?

Related: Whatโ€™s the recommended way to memory-map a file? - #5 by benrimmington