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?