Benchmarks for memmapfile vs fread

1 Ansicht (letzte 30 Tage)
Peter Cook
Peter Cook am 2 Dez. 2017
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).

Antworten (0)

Kategorien

Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by