Performance issue on different computers

6 views (last 30 days)
Jette
Jette on 16 May 2017
Answered: Jette on 19 May 2017
I have a very weird problem. A fellow has changed some code of our project and states that on his computer the changed code is about a factor of 100 times faster than the original code. However, on my computer I can't find a significant performance difference between both versions of the code. On my computer, both version differ at most 1%, and sometime one is faster, sometime the other.
We both use tic/toc for timing, the same test files and the same tested code. We both run MATLAB R2015b (64bit).
The piece of code deals with importing a special ASCII file format into MATLAB.
Has anyone an idea what could be the reason for this? I am absolutly perpexed about it.

Accepted Answer

Jette
Jette on 19 May 2017
I've found the solution. It had something to do with our project library and that the fellow did not use the entire library as I expected. Somewhere in the code is a if - else where he fell into the much slower else due to a missing file in his path.
By the way - the results of the profiler where extremely misleading in this case.
Thanks you for reading and thinking

More Answers (2)

Steven Lord
Steven Lord on 16 May 2017
Is the file that you're importing being accessed on a network drive on your machine and on a local drive (possibly an SSD) on his machine?
Is his machine newer (and have a faster disk, again possibly an SSD) than your machine?
What differences do the report of the Profiler running the code on your machine and the report of the Profiler running the same code on his machine show?
  2 Comments
Steven Lord
Steven Lord on 17 May 2017
Once you have the Profiler reports, see if one of you has shadowed one of the functions included with MATLAB that shows a large performance difference with a different version. If that is not the case, and you can't determine the cause of the performance difference, post a small (~10 line) segment of the code that shows the largest difference and describe the variables used by that code (size, class, attributes, global or not global, etc.)

Sign in to comment.


Jan
Jan on 17 May 2017
It sounds strange if you import an ASCII file and do not see a difference between a local and a network drive. Actually I'd expect the network connection to be the bottleneck. But perhaps you have a 1G connection without a lot of traffic.
A virus scanner can slow down the file access drastically. Disk caching can allow to read a file much faster, so this might be a question of the hardware.
Do the codes run on your computer with the faster or the slower of the versions used by your fellow?
  1 Comment
Jette
Jette on 17 May 2017
I compare network against network and local against local.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!