Why does specifying Xss in Maven Surefire make ScalaTest run twice as fast?


#1

I have one FunSuite of unit tests testing a highly recursive (non-tail) Scala function. If I add the line below to my pom.xml Surefire <configuration> it runs twice as fast.

<argLine>-Xss1024k</argLine>

It doesn’t matter what value I specify, except that if I specify a really low value like -Xss256k I get the expected StackOverflowException. Otherwise, I can set it anywhere from 512k up to 512m and the execution time is all the same. But then if I delete the line entirely from pom.xml the execution time doubles.

Why could that be?