fabienrenaud / java-json-benchmark

Performance testing of serialization and deserialization of Java JSON libraries
MIT License
979 stars 135 forks source link

Set default number of threads based on number of cores #95

Closed sebthom closed 9 months ago

sebthom commented 9 months ago

Using more threads than cores results in unnecessary context switches and will actually decrease throughput. I set the number of threads to the number cores minus 1 so the OS has one core to do other pressing things and does not need to congest the cores utilized by JMH.

fabienrenaud commented 9 months ago

Thanks!