Search code examples
optimizationhardware

Optimising single threaded algorithm on multi core processor


Let’s say I’ve a single threaded algorithm running on Intel Core i7 (4 cores / 8 threads). Which of the following can optimise the speed of my algorithm?

a) switch off CPU core isolation

b) switch off as many cores as possible

c) switch off power saving

d) switch off hyper threading

I think only (d) would help increase the speed.


Solution

  • That's very much dependent on the algorithm functionality. a and b have minimal if at all effect. a is a security feature, presumably shouldn't affect execution speed. b switches off cores that aren't used anyway - might have some minimal effect due to simplification of process scheduling. c can speed up execution by preventing CPU to slow down due to moving to lower power state - but it might or might not be relevant depending on the actual algorithm. d might provide benefit if that single algorithm thread is really capable to effectively use all the physical resources of a single physical core.