MATLAB takes a long time to run the same code on my laptop compared to my desktop.
12 views (last 30 days)
I'm quite new to MATLAB. I need to tune a PID controller for my project using Differential Evolution algorithm. The code for the same takes about 200 secs to run on my desktop, for 100 generations. (2 secs for 1 gen) The same code on my laptop takes about 1000 secs. (10 secs for 1 gen) though it is very new. What could be the problem? I bought this laptop for educational purposes and obviously I want it to be fast and quick. Here's the specifications of my laptop and desktop:
- 2nd Gen. Intel Core i3 2100 @ 3.10 GHz
- 4 GB DDR3 RAM
- 500 GB HDD
- 7th Gen. Intel Core i7 7500U @ 2.70 GHz (base) upto 3.50 Ghz
- 12 GB DDR4 RAM
- 256 GB NVME PCIe M.2 SSD
I know desktops are faster than their laptop counterparts. But come on, it's a 7th Gen Core i7 against a 2nd Gen Core i3 and still it loses the battle. Is there something that can be done to decrease the run time?
Thanks in advance.
KL on 23 Mar 2017
Profile helps to analyse the execution time & number of calls within the script.
This should give you an idea on which part of your program eats up more time.
Good luck, KL
Philip Borghesani on 23 Mar 2017
I think this may be expected Intel "U" processors are not fast they are power efficient.
- Both processors are 2 cores 4 threads
- Desktop processor clocks faster
- Desktop is 75W laptop is 15 (or 7.5 optionally by vendor?) watt
- Many laptop computers have processor speed artificially limited by (due to) cooling capability. Changing power/fan settings may help.
- Intel processors have not gotten much faster per clock over the recent generations.
However benchmarks do show that the 7500U is potentially about 50% faster. I would look into utilities to see if your laptop processor is suffering from thermal throttling.