If you have two-core machines, it means that only two threads can run parallelly at a time, and the rest will stay idle. So, having more threads than your core always creates an overhead, and the context switch will be more. But in your case, it is evident that there are more penalizable tasks that outweigh context switching and thread management overhead by OS. For better understanding please try increasing more threads and check how the time varies. If it will increment upon increase thread then you will be convinced easily.