Skip to content

Inline code in _gr_fmpz_set#2229

Merged
fredrik-johansson merged 1 commit into
flintlib:mainfrom
fredrik-johansson:inlineset
Feb 2, 2025
Merged

Inline code in _gr_fmpz_set#2229
fredrik-johansson merged 1 commit into
flintlib:mainfrom
fredrik-johansson:inlineset

Conversation

@fredrik-johansson

Copy link
Copy Markdown
Collaborator

In #2203 we noticed a small speed regression when converting fmpz_mat_transpose to generics.

It turns out that this has a simple explanation: the double function call overhead _gr_fmpz_set -> fmpz_set. When the operation is inlined in _gr_fmpz_set, fmpz_mat_transpose now runs exactly as fast as the previous non-generic code (and slightly faster than the original fmpz_mat_transpose did with the old matrix representation in FLINT 3.1).

We should do this inlining in more of the gr_fmpz methods, but currently this isn't urgent since we don't use a lot of generics in the fmpz modules yet.

@fredrik-johansson fredrik-johansson merged commit 2087ad7 into flintlib:main Feb 2, 2025
@fredrik-johansson fredrik-johansson deleted the inlineset branch February 2, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant