MinecraftForge / AccessTransformers

Antlr4 definition for MCP / Forge Access Transformers
GNU Lesser General Public License v2.1
14 stars 12 forks source link

Add benchmark to accesstransformer #16

Closed ichttt closed 8 months ago

ichttt commented 2 years ago

Also adjust dependencies and gradle version to match forge 1.19 and securejarhandler. Benchmark setup is based on securejarhandler's setup. I've currently only added benchmarks for AccessTransformerList, as this is one of the central classes, especially because the containsClassTarget Method is called for every class being loaded, which can easily be a couple thousands. Initial benchmarks on my 4790K@4.5GHz on Windows show the following results:

"Benchmark","Mode","Threads","Samples","Score","Score Error (99,9%)","Unit"
"net.minecraftforge.accesstransformer.benchmarks.AccessTransformerListBenchmark.testATLoad","avgt",1,4,"3747,959599","3718,439934","us/op"
"net.minecraftforge.accesstransformer.benchmarks.AccessTransformerListBenchmark.testAtContainsHit","avgt",1,4,"0,124412","0,014262","us/op"
"net.minecraftforge.accesstransformer.benchmarks.AccessTransformerListBenchmark.testAtContainsMiss","avgt",1,4,"9,988946","2,412332","us/op"
LexManos commented 8 months ago

https://github.com/MinecraftForge/AccessTransformers/commit/45d95794492ec7cf6b8c4978f03391c97574aa6e