You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(The disadvantage is that every field access has to go to the heap. With an immutable struct, fields can be pulled onto the stack or into registers, which can improve the performance of a function that spends a lot of time with those fields. If you're just hopping off to the next child in a tree or something, this probably matters less.)
gafter
changed the title
Permit @auto_hash_equals_cached with mutable struct types.
Permit @auto_hash_equals cached=true with mutable struct types.
Aug 18, 2023
gafter
transferred this issue from JuliaServices/AutoHashEqualsCached.jl
Aug 18, 2023
Either
const
, orconst
to each declared field (with a warning?) if not already declared so.The advantage of doing this is that we get both an efficient hash code and an efficient equality (because of the
===
shortcut)const
on a field is only available in Julia 1.8 and later.The text was updated successfully, but these errors were encountered: