mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 18:15:29 +01:00
add a few @inbounds
This commit is contained in:
parent
1c971cb3b1
commit
0fb84a9c61
@ -106,7 +106,7 @@ function evaluate!(
|
||||
) where {T<:FPGroupElement,N}
|
||||
A = alphabet(f)
|
||||
for idx in word(f)
|
||||
t = evaluate!(t, A[idx], alphabet(object(parent(f))))::NTuple{N,T}
|
||||
t = @inbounds evaluate!(t, A[idx], alphabet(object(parent(f))))::NTuple{N,T}
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
@ -49,7 +49,7 @@ Base.:(==)(t::Transvection, s::Transvection) =
|
||||
t.id === s.id && t.ij == s.ij && t.inv == s.inv
|
||||
Base.hash(t::Transvection, h::UInt) = hash(t.id, hash(t.ij, hash(t.inv, h)))
|
||||
|
||||
function evaluate!(v::Tuple, t::Transvection, A::Alphabet)
|
||||
Base.@propagate_inbounds function evaluate!(v::Tuple, t::Transvection, A::Alphabet)
|
||||
i, j = indices(t)
|
||||
@assert i ≤ length(v) && j ≤ length(v)
|
||||
|
||||
|
@ -32,7 +32,7 @@ word_type(::Type{<:AbstractFPGroup}) = Word{UInt8}
|
||||
# the default (results in free rewriting)
|
||||
rewriting(G::AbstractFPGroup) = alphabet(G)
|
||||
|
||||
function (G::AbstractFPGroup)(word::AbstractVector{<:Integer})
|
||||
Base.@propagate_inbounds function (G::AbstractFPGroup)(word::AbstractVector{<:Integer})
|
||||
@boundscheck @assert all(l -> 1 <= l <= length(KnuthBendix.alphabet(G)), word)
|
||||
return FPGroupElement(word_type(G)(word), G)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user