Fast strict transform under toric blowups #4484
Open
+39
−52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I improved the speed of
strict_transform
for an arbitrary toric blowup. More precisely, I improvedcox_ring_module_homomorphism
, which is used forstrict_transform
,total_transform
andstrict_transform_with_index
. The main time-saving techniques:MPolyBuildCtx
to create the polynomial, instead of iteratively adding terms to a polynomial,Vector{Rational{Int64}}
instead ofVector{QQFieldElem}
for the vectorps
,Vector{Int64}
for the vectorps
in the special case where the denominators are 1.Some small other improvements in the core loop:
first(exponents(g))
instead ofcollect(exponents(g))[1]
,exps = [exps; exceptional_exp]
instead ofpush!(exps, exceptional_exp)
reduces allocated memory by about 35% --- I am puzzled why there is a difference here.The function
strict_transform
now seems to be faster than the specialized_strict_transform
in FTheoryTools that could compute strict transform only under blowups along smooth cones. So I removed the specialized function.Also, I added a test for computing the strict transform when blowing up along an existing ray.
Benchmarks
I used the F-Theory computations from @HereAround . Namely, I first commented out lines 797--803 of
experimental/FTheoryTools/src/AbstractFTheoryModels/methods.jl
and edited line 821 of the same file from
for k in 1:nr_blowups
tofor k in 1:5
to have a faster test.Then ran
Results
Previously:
Now:
Improvements