Execution time issue r2016
6 次查看(过去 30 天)
显示 更早的评论
hello there
I was using matlab on my laptop which has integrated intel graphic card , it takes long time to excuite SSIM
then I bought a brand new labtop with high specs and it still taking the same amount of time!
old labtop specs : core i5 2nd u
hdd hard drive
4 GB ram
New labtop specs : core i5 9th h
ssd m.2 hard drive
8 GB ram
Nvidia gtx 1650 GPU
5 个评论
Raymond Norris
2020-8-31
I agree with Rik. One other consideration, if possible, is to upgrade MATLAB.
Rik
2020-8-31
Although generally execution speed will improve from release to release, this is not always the case and improvement will vary. (example below tested with my RegGrow FEX submission)
%the main calculation of RegGrow happens with convn() and mean()
%so this mainly benchmarks 2D convolutions and means of a vector
sz=[100 100];IM=1:prod(sz);IM=reshape(IM,sz);
testtime=zeros(1,20);for iteration=1:numel(testtime),tic,RegGrow(IM,'waitbar',false);testtime(iteration)=toc;end
clc,fprintf('median time of %d passes: %.3f seconds (version: %s)\n',numel(testtime),median(testtime),version);
% Results on the same computer:
% median time of 20 passes: 0.018 seconds (version: 9.8.0.1451342 (R2020a) Update 5)
% median time of 20 passes: 0.022 seconds (version: 9.4.0.813654 (R2018a))
% median time of 20 passes: 0.024 seconds (version: 8.5.0.197613 (R2015a))
% median time of 20 passes: 0.030 seconds (version: 7.12.0.635 (R2011a))
% median time of 20 passes: 0.117 seconds (version: 6.5.0.180913a (R13))
You need a benchmark like this for your specific application to really quantify the improvement. From time to time someone posts an example of a function or set of functions that are a lot slower, sometimes orders of magnitude.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Performance and Memory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!