Benchmarks for memmapfile vs fread

4 vues (au cours des 30 derniers jours)
Peter Cook
Peter Cook le 2 Déc 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).

Réponses (0)

Catégories

En savoir plus sur Multicore Processor Targets dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by