Skip to content
  • 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