1. 12 Jun, 2018 1 commit
  2. 19 May, 2018 2 commits
    • Eric Bruneton's avatar
      Fix wrong import! Correct benchmarks results on my machine: · 63efb1aa
      Eric Bruneton authored
      CURRENT CODE (3 runs)
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7841,639 ± 202,570  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1444,529 ±  41,936  ops/s
      getTypeFromDescriptor                                  thrpt   10  4586,855 ± 109,614  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7884,111 ± 187,510  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1448,835 ±  37,332  ops/s
      getTypeFromDescriptor                                  thrpt   10  4578,097 ± 115,033  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7868,005 ± 165,286  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1453,131 ±  32,611  ops/s
      getTypeFromDescriptor                                  thrpt   10  4537,437 ± 111,732  ops/s
      
      NEW CODE (3 runs)
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10   7868,311 ± 205,813  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10   1400,616 ±  47,122  ops/s
      getTypeFromDescriptor                                  thrpt   10  10447,278 ± 285,315  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10   7822,970 ± 180,999  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10   1430,244 ±  39,596  ops/s
      getTypeFromDescriptor                                  thrpt   10  10371,893 ± 308,044  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7709,202 ± 168,070  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1402,382 ±  34,459  ops/s
      getTypeFromDescriptor                                  thrpt   10  8851,335 ± 259,663  ops/s
      63efb1aa
    • Eric Bruneton's avatar
      Remove the use of toCharArray() to remove some memory allocations. Also add a benchmark for Type. · 5db12737
      Eric Bruneton authored
      Results of the benchmark on my machine:
      
      CURRENT CODE (3 runs)
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  8002,137 ± 309,542  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1393,701 ±  37,392  ops/s
      getTypeFromDescriptor                                  thrpt   10  3469,877 ±  90,339  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7950,019 ± 320,668  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1326,380 ±  29,934  ops/s
      getTypeFromDescriptor                                  thrpt   10  3232,627 ±  89,893  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7931,430 ± 243,812  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1355,610 ±  27,042  ops/s
      getTypeFromDescriptor                                  thrpt   10  3469,378 ±  84,797  ops/s
      
      NEW CODE (3 runs)
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7984,723 ± 211,592  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1260,854 ±  26,638  ops/s
      getTypeFromDescriptor                                  thrpt   10  3442,509 ±  83,137  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7863,562 ± 158,205  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1389,624 ±  39,087  ops/s
      getTypeFromDescriptor                                  thrpt   10  3201,957 ±  53,120  ops/s
      
      getArgumentsAndReturnSizeFromDescriptor                thrpt   10  7871,202 ± 231,629  ops/s
      getArgumentsAndReturnTypesFromDescriptor               thrpt   10  1374,364 ±  32,216  ops/s
      getTypeFromDescriptor                                  thrpt   10  3265,688 ±  72,233  ops/s
      5db12737
  3. 30 Dec, 2017 5 commits
  4. 29 Dec, 2017 1 commit
    • Eric Bruneton's avatar
      Improve the memory benchmarks by using the JMH framework. · 7a4f0045
      Eric Bruneton authored
      Results:
      Benchmark                                          Mode  Cnt        Score      Error  Units
      MemoryBenchmark.newClassNode_asm4_0               thrpt    5      196,689 ±  123,711  ops/s
      MemoryBenchmark.newClassNode_asm4_0:+memory.used  thrpt    5  2798238,715 ± 3602,377  bytes
      MemoryBenchmark.newClassNode_asm5_0               thrpt    5      158,445 ±  111,103  ops/s
      MemoryBenchmark.newClassNode_asm5_0:+memory.used  thrpt    5  2693396,799 ± 4985,178  bytes
      MemoryBenchmark.newClassNode_asm6_0               thrpt    5      140,053 ±   95,105  ops/s
      MemoryBenchmark.newClassNode_asm6_0:+memory.used  thrpt    5  2688716,368 ± 5513,428  bytes
      MemoryBenchmark.newClassNode_asm6_1               thrpt    5      165,112 ±   94,423  ops/s
      MemoryBenchmark.newClassNode_asm6_1:+memory.used  thrpt    5  2690737,112 ± 4993,252  bytes
      MemoryBenchmark.newClass_asm4_0                   thrpt    5      236,938 ±  183,190  ops/s
      MemoryBenchmark.newClass_asm4_0:+memory.used      thrpt    5  1823050,423 ± 2051,755  bytes
      MemoryBenchmark.newClass_asm5_0                   thrpt    5      266,850 ±    3,303  ops/s
      MemoryBenchmark.newClass_asm5_0:+memory.used      thrpt    5  1847376,794 ± 1919,159  bytes
      MemoryBenchmark.newClass_asm6_0                   thrpt    5      238,714 ±  197,099  ops/s
      MemoryBenchmark.newClass_asm6_0:+memory.used      thrpt    5  1848268,051 ± 2092,874  bytes
      MemoryBenchmark.newClass_asm6_1                   thrpt    5      245,291 ±  163,061  ops/s
      MemoryBenchmark.newClass_asm6_1:+memory.used      thrpt    5  1844124,244 ± 2064,886  bytes
      7a4f0045
  5. 28 Dec, 2017 2 commits
    • Eric Bruneton's avatar
      Improve the read-write performance test by using the JMH framework. · 30052454
      Eric Bruneton authored
      Results:
      AdapterBenchmark.getClassInfo_asm4_0                      thrpt   20  12964,540 ± 100,411  ops/s
      AdapterBenchmark.getClassInfo_asm5_0                      thrpt   20  12410,599 ±  64,511  ops/s
      AdapterBenchmark.getClassInfo_asm6_0                      thrpt   20  12538,801 ±  67,891  ops/s
      AdapterBenchmark.getClassInfo_asm6_1                      thrpt   20  15744,919 ±  54,819  ops/s
      AdapterBenchmark.getClassObjectModel_asm4_0               thrpt   20    536,993 ±   2,805  ops/s
      AdapterBenchmark.getClassObjectModel_asm5_0               thrpt   20    539,811 ±   2,934  ops/s
      AdapterBenchmark.getClassObjectModel_asm6_0               thrpt   20    529,741 ±   1,942  ops/s
      AdapterBenchmark.getClassObjectModel_asm6_1               thrpt   20    553,037 ±   3,225  ops/s
      AdapterBenchmark.readAndWriteWithComputeFrames_asm4_0     thrpt   20    167,452 ±   0,664  ops/s
      AdapterBenchmark.readAndWriteWithComputeFrames_asm5_0     thrpt   20    164,215 ±   0,689  ops/s
      AdapterBenchmark.readAndWriteWithComputeFrames_asm6_0     thrpt   20    165,821 ±   0,688  ops/s
      AdapterBenchmark.readAndWriteWithComputeFrames_asm6_1     thrpt   20    174,736 ±   0,673  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_asm4_0       thrpt   20    301,145 ±   1,328  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_asm5_0       thrpt   20    303,352 ±   1,269  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_asm6_0       thrpt   20    317,626 ±   1,079  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_asm6_1       thrpt   20    321,737 ±   1,544  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_aspectJBcel  thrpt   20     82,308 ±   0,389  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_bcel         thrpt   20     65,963 ±   0,261  ops/s
      AdapterBenchmark.readAndWriteWithComputeMaxs_serp         thrpt   20     33,711 ±   0,090  ops/s
      AdapterBenchmark.readAndWriteWithCopyPool_asm4_0          thrpt   20   1144,297 ±   4,976  ops/s
      AdapterBenchmark.readAndWriteWithCopyPool_asm5_0          thrpt   20   1142,265 ±   5,866  ops/s
      AdapterBenchmark.readAndWriteWithCopyPool_asm6_0          thrpt   20   1128,241 ±   5,340  ops/s
      AdapterBenchmark.readAndWriteWithCopyPool_asm6_1          thrpt   20   1235,521 ±   4,344  ops/s
      AdapterBenchmark.readAndWriteWithObjectModel_asm4_0       thrpt   20    252,227 ±   1,036  ops/s
      AdapterBenchmark.readAndWriteWithObjectModel_asm5_0       thrpt   20    248,238 ±   1,110  ops/s
      AdapterBenchmark.readAndWriteWithObjectModel_asm6_0       thrpt   20    246,449 ±   1,103  ops/s
      AdapterBenchmark.readAndWriteWithObjectModel_asm6_1       thrpt   20    261,525 ±   1,003  ops/s
      AdapterBenchmark.readAndWrite_asm4_0                      thrpt   20    313,583 ±   1,429  ops/s
      AdapterBenchmark.readAndWrite_asm5_0                      thrpt   20    319,958 ±   2,057  ops/s
      AdapterBenchmark.readAndWrite_asm6_0                      thrpt   20    316,718 ±   1,316  ops/s
      AdapterBenchmark.readAndWrite_asm6_1                      thrpt   20    319,508 ±   0,990  ops/s
      AdapterBenchmark.readAndWrite_aspectJBcel                 thrpt   20    100,253 ±   0,353  ops/s
      AdapterBenchmark.readAndWrite_bcel                        thrpt   20     79,329 ±   0,235  ops/s
      AdapterBenchmark.readAndWrite_javassist                   thrpt   20    531,673 ±   1,894  ops/s
      AdapterBenchmark.readAndWrite_serp                        thrpt   20     37,049 ±   0,102  ops/s
      AdapterBenchmark.read_asm4_0                              thrpt   20    642,491 ±   2,536  ops/s
      AdapterBenchmark.read_asm5_0                              thrpt   20    682,731 ±   5,122  ops/s
      AdapterBenchmark.read_asm6_0                              thrpt   20    671,490 ±   3,581  ops/s
      AdapterBenchmark.read_asm6_1                              thrpt   20    665,407 ±   2,716  ops/s
      30052454
    • Eric Bruneton's avatar
      Improve the class generation benchmark by using the JMH framework. · fd883951
      Eric Bruneton authored
      Results:
      Benchmark                             Mode  Cnt       Score      Error  Units
      GeneratorBenchmark.asm4_0            thrpt   20  753119,277 ± 1890,328  ops/s
      GeneratorBenchmark.asm5_0            thrpt   20  729869,073 ± 2328,108  ops/s
      GeneratorBenchmark.asm6_0            thrpt   20  728330,694 ± 2244,506  ops/s
      GeneratorBenchmark.asm6_1            thrpt   20  847886,985 ± 2767,943  ops/s
      GeneratorBenchmark.aspectJBcel       thrpt   20  274363,976 ± 1171,862  ops/s
      GeneratorBenchmark.bcel              thrpt   20  196715,573 ±  797,970  ops/s
      GeneratorBenchmark.cojen             thrpt   20  191329,604 ±  898,662  ops/s
      GeneratorBenchmark.csgBytecode       thrpt   20  325157,840 ± 1065,897  ops/s
      GeneratorBenchmark.gnuByteCode       thrpt   20  245634,219 ± 1061,192  ops/s
      GeneratorBenchmark.jclassLib         thrpt   20  280383,253 ±  973,727  ops/s
      GeneratorBenchmark.jiapi             thrpt   20   75012,298 ±  325,473  ops/s
      GeneratorBenchmark.mozillaClassFile  thrpt   20  303011,386 ± 1629,259  ops/s
      fd883951
  6. 26 Dec, 2017 1 commit
  7. 09 Dec, 2017 1 commit
    • Eric Bruneton's avatar
      Improve the code quality of Label and add a Constants interface for internal constants. · 617f4f38
      Eric Bruneton authored
      In more details:
      - add a Constants interface to avoid some magic constants in the code
      - remove the INSTRUCTION_TYPES indirection in ClassReader, and use (table)switch statements on raw opcode values instead
      - remove unnecessary flags BASIC_BLOCK_CHANGED, VISITED and VISITED2 in Label (replaced with a simpler algorithm using an EMPTY_LIST sentinel), as well as the redundant STORE flag
      - add an otherLineNumbers field in Label to store line numbers in a cleaner way than with nextChangedBlock
      - remove the inputStackTop field in Label, which was used to store different values depending on the compute options or basic block types. Replace it with new inputStackSize and outputStackSize fields in Label, and a new (private) outputStackStart field in Frame.
      - use 'short' fields when possible in Frame and Label. Object size in memory with OpenJDK 1.8.0, measured with https://www.javaworld.com/article/2077496/testing-debugging/java-tip-130--do-you-know-your-data-size-.html, decreased from 64 to 56 bytes for Label (despite the added fields), and stayed unchanged (48 bytes) for Frame (despite the added field outputStackStart).
      - split the large visitMaxs method in two smaller methods.
      - performance is unchanged or improved: 1.02-1.04 speedup for ClassReader, no change for ClassReader+ClassWriter, 1.11 speedup for CR+CW with compute maxs, 1.05 speedup for CR+CW with compute frames.
      617f4f38
  8. 07 Oct, 2017 1 commit