Skip to content

Use cached hash codes to short-circuit equality checks #502

Open
@gabbard

Description

@gabbard

In cases where cache_hash=True, we can short-circuit equality checks by first comparing hash codes. This can provide a very big speedup for "heavyweight" objects where field equality comparisons can be expensive (which is likely to be the case if the user bothered to enable hash caching).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions