JulesKouatchou / basic_language_comparison

Other
86 stars 22 forks source link

Should respect a "warm-up" for Java-VM to let JIT-Compiler do its work #14

Open oli-h opened 2 years ago

oli-h commented 2 years ago

Of course, depending on what you want to show such a "warm-up" is or is not appropriate.

Though I propose to have a loop for(int i=0;i<100;i++) doTheTest(); around the core test methods. This gives the Java-VM time to identify the method doTheTest() to be a hotspot and then to JIT-compile it for the next invocation.

Finally you have 100 measurement results. Propose to publish the first one as e.g. "Java cold" and an average of the last 10 ones as "Java warm / JIT compiled".

JulesKouatchou commented 2 years ago

Thank you for the suggestions. I will include them in the next set of runs.