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

speedup elliptic surfaces #3884

Merged
merged 2 commits into from
Jun 24, 2024
Merged

speedup elliptic surfaces #3884

merged 2 commits into from
Jun 24, 2024

Conversation

simonbrandhorst
Copy link
Collaborator

@simonbrandhorst simonbrandhorst commented Jun 23, 2024

50x Speedup. Therefore please backport.
The speedup is relying on the lazy data structures of @HechtiDerLachs
which are now further exploited.

Copy link
Collaborator

@HechtiDerLachs HechtiDerLachs left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the effort!

Copy link
Collaborator

@afkafkafk13 afkafkafk13 left a comment

Choose a reason for hiding this comment

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

Looks good overall. Please answer the (minor) remarks before I approve this. (They do not concern the functionality of the code, but the step from 'solves my problem' to 'is safe to use also by some others'.)

@@ -899,8 +900,27 @@ function maximal_associated_points(
end
end

if mode==:save_gluings && length(comps)==1
R = radical(I)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume that radical first checks whether the ideal sheaf is prime and then does not compute anything, right? So this is about storing the right attributes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not quite. Since length(comps)==1, the support of I is irreducible. Therefore the radical of I is prime.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The maths was clear from the beginning.
From the comment below I deduce that this is to move it to the type RadicalIdealSheaf, which is fine with me and confirms my guess (but in a slightly different way). I would still set is_prime first and then do the radical -- and make sure that is_prime is checked and transferred to the new object by radical, if applicable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering whether the decomposition leading to comp did not produce further local representatives of the prime ideal sheaf already . Maybe it's worth caching those results in the RadicalIdealSheaf already?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we have the space for it....

@@ -899,8 +900,27 @@ function maximal_associated_points(
end
end

if mode==:save_gluings && length(comps)==1
R = radical(I)
set_attribute!(R, :is_prime=>true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be set automatically for PrimeIdealSheafFromChart? Shouldn't this be inherited through radical in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

radical(I) will be a RadicalIdealSheaf and therefore the type does not know that it is prime.

Copy link
Collaborator

Choose a reason for hiding this comment

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

see above.

@@ -948,15 +948,46 @@ end

Return the fiber components of the fiber over the point $P \in C$.
"""
function fiber_components(S::EllipticSurface, P)
function fiber_components(S::EllipticSurface, P; algorithm=:exceptional_divisors)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't you want to state what type P should have? You expect it to be of a certain form later on.

If this P is an automatically generated object from further up, then you might want to give it an attribute which allows you a sanity check inside the method before continuing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

P should be a rational point on a covered scheme. But there is no type/interface for these yet. There is a similar mess in other places.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok. This needs to be cleaned up at some point, but definitely not now. I agree.

@simonbrandhorst simonbrandhorst merged commit 09c52c1 into master Jun 24, 2024
23 of 27 checks passed
@simonbrandhorst simonbrandhorst deleted the sb/speedup branch June 24, 2024 06:59
benlorenz pushed a commit that referenced this pull request Jul 3, 2024
* speedup elliptic surfaces

(cherry picked from commit 09c52c1)
@benlorenz benlorenz mentioned this pull request Jul 3, 2024
2 tasks
@benlorenz benlorenz removed the backport 1.1.x backport for release 1.1 label Jul 4, 2024
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

Successfully merging this pull request may close these issues.

4 participants