Strumenta / antlr-kotlin

Support for Kotlin as a target for ANTLR 4
Apache License 2.0
221 stars 47 forks source link

Create a benchmarks module #166

Closed lppedd closed 6 months ago

lppedd commented 6 months ago

Closes: #165

@KvanTTT @mike-lischke @ftomassetti

You can run JVM benchmarks with:

gradlew :antlr-kotlin-benchmarks:jvmBenchmark

And you can run JS benchmarks by removing the @Ignore annotation from ManualMySQLBenchmarks, with:

gradlew :antlr-kotlin-benchmarks:jsTests

You can observe that the first warm up run is extremely slow in JS:

Warm up 1: 8575.3754 ms
Warm up 2: 742.1048 ms
Warm up 3: 603.8989 ms
...

Tho even on the JVM the first run is pretty slow.

Warm up 1: 2618.4108 ms
Warm up 2: 217.177499 ms
Warm up 3: 158.166601 ms
...
ftomassetti commented 6 months ago

Thank you, this is very valuable. Could you add a description of this in the README?

lppedd commented 6 months ago

Could you add a description of this in the README?

@ftomassetti done!

ftomassetti commented 6 months ago

Looks good to me. Thank you @lppedd and @mike-lischke for the discussion and providing the inspiration for this