diff --git a/src/main/java/io/usethesource/vallang/impl/persistent/Tuple.java b/src/main/java/io/usethesource/vallang/impl/persistent/Tuple.java index 1ed92836..30bdfa97 100644 --- a/src/main/java/io/usethesource/vallang/impl/persistent/Tuple.java +++ b/src/main/java/io/usethesource/vallang/impl/persistent/Tuple.java @@ -174,10 +174,11 @@ public boolean equals(@Nullable Object o) { if (o.getClass() == getClass()) { Tuple otherTuple = (Tuple) o; - if (getType() != otherTuple.getType()) { - return false; + // checking for the type will dynamically allocate memory + // because tuple types are computed lazily. + // so we skip this "fast failure" check + // if (getType() != otherTuple.getType()) { return false; } - } IValue[] otherElements = otherTuple.elements; int nrOfElements = elements.length;