Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize FqFieldElem construction #2062

Open
fingolfin opened this issue Apr 2, 2025 · 0 comments
Open

Optimize FqFieldElem construction #2062

fingolfin opened this issue Apr 2, 2025 · 0 comments

Comments

@fingolfin
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant