필터 지우기
필터 지우기

runtime load mat-file not proportional to size?

조회 수: 1 (최근 30일)
Christian Tieber
Christian Tieber 2021년 2월 8일
댓글: Jan 2021년 2월 8일
It takes me 0.08 seconds to load a .mat-file with 138MB containing 367 nx1 double arrays.
But 0.57 seconds to load a .mat-file with 3MB containing one nx250 double array.
Why is that?
I changed the structure of the file to be faster. Now i am slower.
Thanks in advance!

답변 (2개)

Christian Tieber
Christian Tieber 2021년 2월 8일
Same story if i just load, save and reload:
disp('load matfile: ');
tic
data = load(fullmatpath);
toc
dataPath = ['data\',filename];
save(dataPath, 'data');
disp('load data: ');
tic
load(dataPath);
toc
load matfile:
Elapsed time is 0.086910 seconds.
load data:
Elapsed time is 0.580817 seconds.
  댓글 수: 2
Christian Tieber
Christian Tieber 2021년 2월 8일
hint: it has nothing to do with the path. Both paths point to the same drive.
Jan
Jan 2021년 2월 8일
If you do not use an absolute path name, Matlab searchs in its PATH.
Can you provide some test data, e.g. created by RAND, which reproduce your observations?

댓글을 달려면 로그인하십시오.


Jan
Jan 2021년 2월 8일
Do you saved in compressed or uncompressed format? In v6, v7 or v7.3 style?
Is the file contained in the disk cache of your HDD or SSD? This will influence the speed massively also.
  댓글 수: 1
Christian Tieber
Christian Tieber 2021년 2월 8일
"Do you saved in compressed or uncompressed format? In v6, v7 or v7.3 style?"
Tried all of them with similar results.
"Is the file contained in the disk cache of your HDD or SSD? This will influence the speed massively also."
I dont know. How can i find out?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by