Le 19/11/2024 à 19:12, Emmanuel Bourg a écrit :
I ran "mvn clean" and "mvn package" 20 times, ignoring the first 10 runs
to warm up the system caches, and noted the total build time reported by
Maven. The build machine is a 6 years old laptop (Core i6 7500U, 32GB
RAM) on Windows 10, using Java 8:
At commit 7eee2066, before the lambda change, I get:
Average: 38,788s ±601ms
At commit dfd4a9e4, on the commit removing the lambdas, I get:
Average: 38,132s ±660ms (1.7% improvement)
At commit cdc0125b, after all my changes, I get:
Average: 37,820s ±745 (2,5% improvement)
I didn't expect such a noticeable difference but it looks like the build
time actually improved.
I ran another set of tests on a faster machine. Here is the setup:
- Xeon E-2274G 4C/8T @ 4GHz, 64GB RAM
- Debian Sid
- OpenJDK 8 and 21
- Maven 3.8.8
- 100 runs per test
- "mvn compile test" only, no "package" goal
- "mvn clean" between runs, not measured
- animal-sniffer, jacoco and buildnumber plugins disabled
- first build at commit 7eee2066 before the change
- second build at commit dfd4a9e4 (lambda removal) + 8047556
(String.format() removal)
Here are the results:
OpenJDK 8 OpenJDK 21
Before 8.030s ±345ms (±4.30%) 8.089s ±217ms (±2.68%)
After 7.940s ±320ms (±4.03%) 8.016s ±183ms (±2.28%)
Difference -90ms (-1.12%) -73ms (-0.91%)
So here again, it's slightly faster without lambdas.
Emmanuel Bourg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org