Benchmarks for memmapfile vs fread
1 view (last 30 days)
Show older comments
Has anyone (The MathWorks?) measured & collected benchmarks for memmapfile versus fread (for various file sizes, binary file structure size & complexity, system architecture, hardware, etc.) ?
In one my applications I use both memmapfile & fread to serially read & process large datasets O(10^13-10^14) bytes comprised of structured binary files O(10^8-10^9) bytes which are essentially a short header (say 1024 bytes) followed by a very large array of integers. I am interested in adding a control structure to use one or the other based on dataset characteristics (i.e. system architecture, whether reading from SATA or RAIDx or USB3, file size).
I've done similar comparisons in Python and (for my system and particular file structure) and found that numpy.fromfile and mmap seem to be faster than open + struct.unpack (there's no direct equivalent to fread in python).
0 Comments
Answers (0)
See Also
Categories
Find more on Multicore Processor Targets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!