Set up code for determining optimal multithreading threshold