diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-02-02 16:00:34 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-02-02 16:00:34 +0000 |
commit | a7843fac5cfc4b5d755a10fc61dce896cc881d9e (patch) | |
tree | 7c5c6b9776cdab8b17bb20d29b8584bd74d0e471 /Source/Core/AbsyQuant.cs | |
parent | 964ee79dcfd492afd6c4a7c21b67089b76cd78e0 (diff) |
Fix performance issue in ComputeHashCode() methods of Expr classes.
If constructing immutable Expr bottom up this would be very inefficient
because the hashcode would be recomputed unnecessarily. Now just make
ComputeHashCode() methods call GetHashCode() on Expr instead.
Diffstat (limited to 'Source/Core/AbsyQuant.cs')
-rw-r--r-- | Source/Core/AbsyQuant.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/AbsyQuant.cs b/Source/Core/AbsyQuant.cs index 1bd16e4a..2258e553 100644 --- a/Source/Core/AbsyQuant.cs +++ b/Source/Core/AbsyQuant.cs @@ -143,7 +143,7 @@ namespace Microsoft.Boogie { h = ( 53 * h ) + dummyVar.GetHashCode();
}
- h ^= this.Body.ComputeHashCode();
+ h ^= this.Body.GetHashCode();
// DO NOT USE TypeParameters.GetHashCode() because we want structural
// identical Expr to have the same hash code **not** identical references
|