Benchmarks for memmapfile vs fread

조회 수: 5 (최근 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 CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by