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
optimize creating elements of orders and number fields by coercing in lists #1134
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Attached bundle partially addresses this issue, by implementing a fast QQ => quadratic number field element coercion. Currently this only affects implicit coercions, but when Robert+David's new coercion framework is finished, it should help explicit coercions too. But it still doesn't totally address the issue for this ticket. Example:
Before:
After:
|
comment:4
I think it's worth applying this patch, even if it doesn't solve the whole problem. In my tests, it applied cleanly, sage/rings/number_field/* doctests still passed, and the code looks reasonable. I approve. |
comment:5
Applied 1134.hg (1.4 kB) - added by dmharvey on 11/14/2007 03:30:21 PM. What are we supposed to do about this now? Close this and open another ticket for the remaining issue? Cheers, Michael |
Author: Mike Hansen |
comment:9
Attachment: trac_1134.patch.gz I posted a patch which adds a fast case for tuples / lists of coefficients in the power basis. For the timings with Z_F, most of the time is spent checking the embedding. I've added a check option to disable that check if you know that the element is already in the order. The bundle which was attached had been previously merged in. |
comment:12
Patch applies with some fuzz to sage-6.0 if you use |
comment:14
With some careful merge I was able to make the patch applied and work on sage-6.3.beta3. But, the map One interesting optimization in the ticket is the Also, as it was said in comment:9 most of the time in the construction is spent in checking. So it would be worth to optimize it. The longest part comes from decomposing a vector on a given basis as the timings below show. The construction takes roughly 600 micro seconds
But most of the time is spent in checking that some vector belong to some submodule
And in
|
coerce speed question from john voight
system:sage
{{{id=12|
}}}
Component: number fields
Author: Mike Hansen
Issue created by migration from https://trac.sagemath.org/ticket/1134
The text was updated successfully, but these errors were encountered: