commit | 409e0f578b620c38f6c8626dee78783219d2956e | [log] [tgz] |
---|---|---|
author | Sam Berlin <sameb@google.com> | Sat May 10 10:34:16 2014 -0400 |
committer | Sam Berlin <sameb@google.com> | Sat May 10 10:34:16 2014 -0400 |
tree | b884da0ec0f1c4566558e6da54b9a09188944fa4 | |
parent | 4daa205dc4fe1d339f91155dde65f3941cbd144c [diff] |
Try to use cglibs FastClass to invoke @Provides methods, it's faster! Here is a caliper benchmark to demonstrate the difference. https://caliper.googleplex.com/runs/2d349fec-2742-45e1-b6e5-16997c522387#r:scenario.benchmarkSpec.methodName,scenario.benchmarkSpec.parameters.strategy This should save about 200-300 ns per method invocation and about 224 bytes (over 4 objects) of allocations for each invocation. The cost of this (of course) is greater permgen usage and potentially slower startup/injector creation due to the class generation. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=66364901