Skip to content
Commit 710baffb authored by Kaushik Kulkarni's avatar Kaushik Kulkarni Committed by Kaushik Kulkarni
Browse files

check identity in EqualityComparisonMapper

Not doing so would lead to a quadratic equality comparison cost in
if EqualityComparisonMapper is created and destroyed frequently, which
is typically the case in a CachedMapper.

Consider the graphs:

dag1 = 2 * x
dag2 = 2 * x  # note that 'dag1 is not dag2', but dag1 == dag2

where 'x' is a very large graph. Without this patch, comparing dag1 and
dag2 would redundantly traverse all elements of 'x'.
parent 57afae65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment