Scala performance FAQ: Is there a reliable way to determine the number of CPUs or cores on a computer?There is a reliable way to determine the number of CPUs or cores in Scala using the Java Runtime class.