eclipse-aspectj / aspectj

Other
304 stars 86 forks source link

Make Trace instances as static final to give JIT a chance to optimize #156

Open turbanoff opened 2 years ago

turbanoff commented 2 years ago

It's known that JIT could speculate about classes fields. JIT in HotSpot require such fields to be marked as static final. https://shipilev.net/jvm/anatomy-quarks/15-just-in-time-constants/ I propose to mark all Trace instances as static final, as they are used very often.

I will update other fields in following PRs. Focused here only one class to minimize changes and make review easier.