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

Huge amount of dynamic dispatch #92

Open
nsajko opened this issue Nov 22, 2023 · 2 comments
Open

Huge amount of dynamic dispatch #92

nsajko opened this issue Nov 22, 2023 · 2 comments

Comments

@nsajko
Copy link
Contributor

nsajko commented Nov 22, 2023

julia> using JET, Groebner, AbstractAlgebra

julia> _, x = QQ["x"]
(Univariate polynomial ring in x over rationals, x)

julia> @report_opt groebner([x^3-x^2-1])

The @report_opt command prints so many entries that I can't even scroll up to the beginning. I'm guessing that improving the situation here would tremendously improve performance.

@sumiya11
Copy link
Owner

sumiya11 commented Nov 22, 2023

Hi @nsajko , thanks for reporting this.

Wow, this is a lot of dynamic dispatch !

Previously, I have tried to reduce dynamic dispatch in Groebner a bit. My experience at that time was that if the types in the main "number-crunching" routines were inferred successfully, then dynamic dispatch in other parts of the code did not hinder runtime performance too much.

I may be wrong about that. Seeing the number of errors reported by @report_opt, it is possible that I missed something, and revisiting this issue in a systematical manner can be useful.

@sumiya11
Copy link
Owner

sumiya11 commented Nov 22, 2023

By the way, as I understand, some of the runtime dispatch comes from other modules. For example, if I do

using JET, Groebner, AbstractAlgebra
R, x = QQ["x"]
@report_opt target_modules=(Groebner,) groebner([x + 1])

the list seems to be much shorter

EDIT: but still, @report_opt groebner([x + 1]) contains useful info that is not included when using target_modules=(Groebner,). So, thanks for bringing this to my attenrion

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