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

Faster is_zero_row for Nemo matrices #1805

Closed
lgoettgens opened this issue Jun 26, 2024 · 2 comments
Closed

Faster is_zero_row for Nemo matrices #1805

lgoettgens opened this issue Jun 26, 2024 · 2 comments

Comments

@lgoettgens
Copy link
Collaborator

the point is that is_zero_row for ZZ should be done via

  • get the pointer of the row (no c-call!)
  • check if the entries are binary zero (no c-call)
    Currently it uses 2 c-calls per entry hence the generic is fine.
    The same logic would apply also to Z/nZ, small or large and possible Native.GF(p)

Originally posted by @fieker in #1801 (comment)

@fingolfin
Copy link
Member

Here are some steps towards that:

  1. Replace ccalls in mat_entry_ptr methods with direct pointer computations, e.g. as done in PR Optimize mat_entry_ptr for ZZMatrix #1807
  2. Replace ccalls in various test functions with more direct access, e.g. as done in PR Optimize is_unit/is_zero/is_one for ZZRingElem #1808 -- another e.g. also is_zero etc. for QQFieldElem could be im

My two PRs mark the way, but similar techniques should be applied to many other flint wrappers. Perhaps @aaruni96 can work on that after the Begehung (we'll talk about it when he's back in Kaiserslautern)

@fingolfin fingolfin changed the title Faster is_zero_row for matrices over ZZ and ZZmod Faster is_zero_row for Nemo matrices Jun 27, 2024
@fingolfin
Copy link
Member

With Nemocas/AbstractAlgebra.jl#1802 added to the mix, I really think we can close this.

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

2 participants