Benchmarks for memmapfile vs fread

7 ビュー (過去 30 日間)
Peter Cook
Peter Cook 2017 年 12 月 2 日
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 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by