We are conducting a research project on re-ordering Stream APIs for improving program execution speed.
Before and after re-ordering, we measured running time of tests which execute target Stream.
Command for running tests is :
time ./gradlew -Dtest.single=RestTemplateTests test
and the result is :
the order of Stream API test running time
===============================================
distinct().sorted() 50.165s
sorted().distinct() 47.752s
Comment From: pivotal-issuemaster
@HirotoTanaka114 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@HirotoTanaka114 Thank you for signing the Contributor License Agreement!
Comment From: rstoyanchev
This time however includes compiling and running tests from other modules dependent on spring-web. Running from inside the IDE for example I get a very small difference in the execution for the tests with and without the change. Further, to really prove it is better, the JVM would need to warm up, e.g. using jmh.