Skip to content

Commit

Permalink
Reuse Marker object
Browse files Browse the repository at this point in the history
This improves TupleDomain performance
and reduces retained memory.
  • Loading branch information
sopel39 committed Sep 18, 2020
1 parent 486db08 commit b055601
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public static Range lessThanOrEqual(Type type, Object high)

public static Range equal(Type type, Object value)
{
return new Range(Marker.exactly(type, value), Marker.exactly(type, value));
Marker marker = Marker.exactly(type, value);
return new Range(marker, marker);
}

public static Range range(Type type, Object low, boolean lowInclusive, Object high, boolean highInclusive)
Expand Down

0 comments on commit b055601

Please sign in to comment.