| Other |
|---|
| repo-valhallaUnresolved |
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
LIFE (Legacy Idiom For Equality) is an optimization that makes a reference equality check before the "equals" method invocation to speed up the equality check.
Like it's implemented in the Objects.equals method:
public static boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
In Valhalla, such equality optimization causes performance regression. Reference check on value classes (and/or migrated classes) is expensive and really unnecessary.
1. SPECjbb2005 has -7% regressions.
The source: equality check for j.l.Integer inside j.u.HashMap.
2. A simple microbenchmark like:
@Benchmark
public OffsetDateTime odt_now() {
return OffsetDateTime.now();
}
has -30% performance regression.
The source: ConcurrentMap<Integer, ZoneOffsetTransition[]> lastRulesCache
|