Skip to content

Suboptimal choice of algorithm by Matrix(QQ).solve_right() #39197

@user202729

Description

@user202729

Steps To Reproduce

set_random_seed(1)
n=26
entry_size = 100
A = matrix.block([
        [matrix([[randint(0, 2^entry_size) for col in range(n)] for row in range(n*2)])],
        ])
x = vector([randint(0, 2^entry_size) for i in range(n)])
b = A*x

%time x1 = A.solve_right(b)
# more than a second

%time x1 = A._solve_right_general(b.column(), check=True).column(0)
# instant

Expected Behavior

both are fast

Actual Behavior

Additional Information

No response

Environment

  • OS: Linux
  • Sage Version: latest develop

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions