Computational time evaluation over different computers
Show older comments
Hi,
I have the following problem. I built 2 functions: one should be faster, and let's call it F1, and another one should be slower, let's call it F2. I have 2 computers, one is a laptop with 8GB of RAM and one is a desktop with 12GB of RAM, and F1 is actually faster than F2. My colleague has also a laptop with 16GB of RAM (the processor is comparable to mine), and a desktop computer with 48GB of RAM. With his computers F1 is slower than F2.
The time is computed using timeit.
Now, I can accept that, between different computers, the time changes, but still the ratio should be the same: if something is programmed in a way that it should be faster, it should be faster with every machine. F1 should always be faster than F2.
With 4 machine more or less comparable in terms of processors, with different RAM, 2 machines give me the answer "F1" is faster, and 2 machines give me the answer "F2" is faster. Actually, the ones with more RAM give the result that F1 is the slowest one. All of them have the same MATLAB version
What can be the reason for that?
1 Comment
Adam
on 27 Oct 2014
It's difficult to comment really without knowing what the two functions are and what size of data they are running on etc, etc.
For example, maybe the extra RAM allows F2 to be more efficient than it could be with less RAM whereas for F1 it makes no difference. Quite unlikely, but without knowing anything about the functions it is impossible to say.
Accepted Answer
More Answers (1)
Kevin Dupraz
on 23 Sep 2020
0 votes
Hi all,
I have a very strange behaviour with a simulation code under Matlab that is similar to this post.
My simulation code run on my laptop (Intel Core i7-4810MQ @2.8GHz, RAM 32 Go, windows 8.1 pro 64bits) and take 15s to finish in average (with matlab 2015b and 2017b).
I send the same code (classes and script) on the calculation server of my lab (Intel Xeon E5-2680 v2 @2.8GHz, RAM 128 Go, windows Server 2012 R2 Standard). On the server the code take twice the time to execute, hence about 30s (with matlab 2015b and 2018b).
On the paper the server is better than my laptop, so why the same code take more time (a factor of 2) ? There exists configuration to speed up the excution that is activate on my laptop and not on my server ?
Thanks for any explaination ^^.
PS: the timing is made with the "Run and time" button.
Categories
Find more on Graphics Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!