Skip to content

Optimize FqFieldElem construction #2062

Open
@fingolfin

Description

@fingolfin

In oscar-system/Oscar.jl#4581 I am trying to optimize conversion between GAP and OSCAR finite field elems (FFE), and one of the bottlenecks is the construction of FqFieldElem from a vector of integer coefficients (a Vector{Int}).

This ends up calling the following Nemo function:

function (a::FqField)(b::Vector{<:IntegerUnion})
  da = degree(a)
  db = length(b)
  da == db || error("Coercion impossible")
  return a(parent(defining_polynomial(a))(b))
end

So this first constructs a polynomial from the Vector{Int} and then converts that into an FqFieldElem. It would be nice if this intermediate step could be skipped.

However I am not sure how feasible that is without "cheating" (i.e. doing different things depending on which underlying field implementation is used).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions