2 ms·
While David had dismissed CPU affinity because of the potential of other threads in the stack not benefitting from additional cores, I wanted to test and see wh
by crad 17y ago
While David had dismissed CPU affinity because of the potential of other threads in the stack not benefitting from additional cores, I wanted to test and see what impact it would have. Granted these are single run #'s on linux, but it's interesting to see that even a single thread adds minor overhead.
Code:
http://gmr.privatepaste.com/7ee226e690
Single call of the function:
gmr@binti ~ $ ./test.sh
real 0m10.840s
user 0m10.824s
sys 0m0.008s
With Processor Affinity on Single CPU:
gmr@binti ~ $ taskset 01 ./test.sh
real 0m11.210s
user 0m11.207s
sys 0m0.004s
Without Processor Affinity:
gmr@binti ~ $ ./test.sh
real 0m14.389s
user 0m12.488s
sys 0m3.789s