Skip to content

Commit d6bdb6a

Browse files
committed
Reduce class init time for Object model layouts.
1 parent 54c45cd commit d6bdb6a

File tree

1 file changed

+6
-0
lines changed
  • truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object

1 file changed

+6
-0
lines changed

truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/LayoutImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ protected record Key(
138138
int implicitCastFlags,
139139
LayoutStrategy strategy) {
140140

141+
// letting Java generate hashcodes has slow startup
142+
@Override
143+
public int hashCode() {
144+
return Objects.hash(type, implicitCastFlags, strategy);
145+
}
146+
141147
@Override
142148
public boolean equals(Object obj) {
143149
if (this == obj) {

0 commit comments

Comments
 (0)