ASM

ASM Performance Benchmarks

Each chart shows either the number of "operations" per second that can be performed by several versions of ASM and other libraries (the larger the better), or the number of memory bytes used by one operation (the smaller the better). The definition of an "operation" depends on the benchmark, and is given below for each benchmark. The "few dozen classes" mentioned below are the same for all benchmarks.

This page is generated automatically from the results of the JMH ASM benchmarks.

AdapterBenchmark.getClassInfo

One operation = create a ClassReader and call getAccess(), getClassName(), getSuperName(), and getInterfaces() on it, for a few dozen classes.

0 20000 ops/s

AdapterBenchmark.getClassObjectModel

One operation = create a ClassReader and a ClassNode from it, for a few dozen classes.

0 1000 ops/s

AdapterBenchmark.readAndWriteWithComputeFrames

One operation = create a ClassReader and make a ClassWriter with the COMPUTE_FRAMES option visit and serialize it, for a few dozen classes.

0 200 ops/s

AdapterBenchmark.readAndWriteWithComputeMaxs

One operation = create a ClassReader and make a ClassWriter with the COMPUTE_MAXS option visit and serialize it (or the equivalent for the other libraries), for a few dozen classes.

0 500 ops/s

AdapterBenchmark.readAndWriteWithCopyPool

One operation = create a ClassReader and make a ClassWriter with the "copy constant pool" optimization visit and serialize it, for a few dozen classes.

0 2000 ops/s

AdapterBenchmark.readAndWriteWithObjectModel

One operation = create a ClassReader and make a ClassWriter visit and serialize it, via a ClassNode, for a few dozen classes.

0 500 ops/s

AdapterBenchmark.readAndWrite

One operation = create a ClassReader and make a ClassWriter visit and serialize it (or the equivalent for the other libraries), for a few dozen classes.

0 1000 ops/s

AdapterBenchmark.read

One operation = create a ClassReader and make an empty visitor visit it, for a few dozen classes.

0 1000 ops/s

GeneratorBenchmark

One operation = generate a HelloWorld class in byte array form.

0 1000000 ops/s

MemoryBenchmark.newClassNode

One operation = create, populate and store a ClassNode for a few dozen classes.

0 5 MB

MemoryBenchmark.newClass

One operation = create, populate and store a ClassWriter for a few dozen classes.

0 2 MB