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

Improve performance of bracket for AbstractLieAlgebraElem #4228

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

lgoettgens
Copy link
Member

by being a bit smarter with handling sparse rows

@lgoettgens lgoettgens added topic: LieAlgebras experimental Only changes experimental parts of the code labels Oct 22, 2024
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.58%. Comparing base (88b734c) to head (e1c7e0c).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4228   +/-   ##
=======================================
  Coverage   84.58%   84.58%           
=======================================
  Files         631      631           
  Lines       85009    85016    +7     
=======================================
+ Hits        71908    71915    +7     
  Misses      13101    13101           
Files with missing lines Coverage Δ
experimental/LieAlgebras/src/AbstractLieAlgebra.jl 97.42% <100.00%> (+0.09%) ⬆️

iszero(cxi) && continue
for (j, cyj) in enumerate(coefficients(y))
iszero(cyj) && continue
Hecke.add_scaled_row!(_struct_consts(L)[i, j], vec, cxi * cyj)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double checked and it seems this is indeed the correct argument order -- very confusing when one already knows addmul! :-(.

On the up side, perhaps we can just simply define methods

addmul!(a::SRow{T}, b::SRow{T}, c::T) where T = add_right_scaled_row(b, a, c) 
addmul!(a::SRow{T}, b::T, c::SRow{T}) where T = add_left_scaled_row(c, a, b)

and migrate to those over time?

But of course that's not any reason to hold up this PR, just musings :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See thofma/Hecke.jl#1659. I would suggest to merge this PR here right now and then once thofma/Hecke.jl#1659 is available go through Oscar and phase out the add_scaled_row! calls. (if you agree please approve and merge this)

@fingolfin fingolfin merged commit 5c30f3a into oscar-system:master Oct 24, 2024
29 checks passed
@lgoettgens lgoettgens deleted the lg/Lie-arithmetic branch October 24, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Only changes experimental parts of the code topic: LieAlgebras
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants