I was curious if anyone had any hard numbers around the performance difference between annotating Entities using private fields instead of public getter methods. I\'ve hear
Loaded 5000 records into a simple 3 column table. Mapped two classes to that table, one using annotated private fields and another using annotated public getters. Ran 30 runs of Spring's HibernateTemplate.loadAll() followed by a HibernateTemplate.clear() to purge the Session cache. Results in ms below...
methods total: 6510, average: 217
fields total: 6586, average: 219
I should probably take another stab at it after adding more properties to each class but right now the difference doesn't appear to be statistically significant.