hibernate-validator icon indicating copy to clipboard operation
hibernate-validator copied to clipboard

HV-1226 Explore usage of method handles instead of core reflection in ReflectionHelper#getValue()

Open marko-bekhta opened this issue 7 years ago • 1 comments

  • https://hibernate.atlassian.net/browse/HV-1226

This PR is an attempt to allow users to switch between method handles and reflection when accessing properties.

EDIT: And as usual in such cases - some numbers: method handles:

# Run complete. Total time: 00:00:37
Benchmark                                   Mode  Cnt     Score     Error   Units
SimpleValidation.testSimpleBeanValidation  thrpt   20  2862.591 ± 195.745  ops/ms

reflection:

# Run complete. Total time: 00:00:37
Benchmark                                   Mode  Cnt     Score    Error   Units
SimpleValidation.testSimpleBeanValidation  thrpt   20  2739.682 ± 60.490  ops/ms

marko-bekhta avatar Jun 20 '18 15:06 marko-bekhta

OK, for now, let's give up on MethodHandles. (Just so that you don't waste time rebasing this)

gsmet avatar Feb 17 '19 20:02 gsmet