Performance issue on different computers

6 visualizaciones (últimos 30 días)
Jette
Jette el 16 de Mayo de 2017
Respondida: Jette el 19 de Mayo de 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.

Respuesta aceptada

Jette
Jette el 19 de Mayo de 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

Más respuestas (2)

Steven Lord
Steven Lord el 16 de Mayo de 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 comentarios
Jette
Jette el 17 de Mayo de 2017
Editada: Jette el 17 de Mayo de 2017
We both work on local drives. I also tried it with network drive but don't see a performance difference between the 2 code versions in this case.
In my opinion, it should not matter which kind of local drive we have or if one computer is newer/faster than the other since I do not compare his time with my time but always 2 times on the same computer. Actually, I have a very slow computer.
I asked him to run the profiler to have a look what exactly takes so much time on his computer.
Steven Lord
Steven Lord el 17 de Mayo de 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.)

Iniciar sesión para comentar.


Jan
Jan el 17 de Mayo de 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 comentario
Jette
Jette el 17 de Mayo de 2017
I compare network against network and local against local.

Iniciar sesión para comentar.

Categorías

Más información sobre Language Support en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by