1. A computer system for simultaneous multithreading in a processor, the computer system comprising: one or more computer processors; one or more non-transitory computer readable storage media; program instructions stored on the one or more non-transitory computer readable storage media for execution by at least one of the one or more computer processors, the program instructions comprising: a sampler configured for measuring an SMT-performance value of a software code, wherein the software code is executed in a simultaneous multithreading mode by the processor, wherein the sampler is also configured for measuring non-SMT-performance value of the software code, wherein the software code is executed in a non-simultaneous multithreading mode by the processor; a comparing module configured for comparing the SMT-performance value with the non-SMT-performance value and validating performance values, in a performance table based on comparing a version of the software code with a version stored in the performance table with regard to the use of performance values in a decision to dispatch in SMT mode or non-SMT mode; and a dispatcher configured for dispatching the software code for an execution mode by the processor, based on the comparing, wherein the execution mode is at least one of SMT-mode or non-SMT-mode, and wherein different portions of the software code can be executed in different execution modes based on resource requirements of the different portions.