From f4858fba1486ba3eebbec25db3f421ceab782f18 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Sun, 16 May 2021 22:30:50 +0200 Subject: [PATCH] move normalform! to equality_data heuristic: compute normalform! only if length of automorphism is greater than 8 --- src/new_autgroups.jl | 8 +++----- src/new_hashing.jl | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/new_autgroups.jl b/src/new_autgroups.jl index 4be666a..a8da29a 100644 --- a/src/new_autgroups.jl +++ b/src/new_autgroups.jl @@ -42,12 +42,10 @@ function Base.:(==)(g::A, h::A) where A<:FPGroupElement{<:AutomorphismGroup} hash(g) != hash(h) && return false end - normalform!(g) - normalform!(h) - word(g) == word(h) && return true + length(word(g)) > 8 && normalform!(g) + length(word(h)) > 8 && normalform!(h) - @assert isnormalform(g) - @assert isnormalform(h) + word(g) == word(h) && return true img_computed, imh_computed = false, false diff --git a/src/new_hashing.jl b/src/new_hashing.jl index 3c771c2..af447ac 100644 --- a/src/new_hashing.jl +++ b/src/new_hashing.jl @@ -35,7 +35,6 @@ function _update_savedhash!(g::FPGroupElement, data) end function Base.hash(g::FPGroupElement, h::UInt) - normalform!(g) _isvalidhash(g) || _update_savedhash!(g, equality_data(g)) return hash(g.savedhash >> count_ones(__BITFLAGS_MASK) , h) end