id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
22524,Optimize computing points of lattice polytopes,novoselt,,"A follow up to #22391. My original problem was too slow computation of zero via
{{{
#!python
Delta3 = LatticePolytope([(1,0,0), (0,1,0), (0,0,1), (-1,-4,-6)])
sum(len(e.interior_points()) * len(e.dual().interior_points()) for e in Delta3.edges())
}}}
Sage 7.6.beta4 gives
- timeit: 5 loops, best of 3: 1.73 s per loop
- profiler: 71844 function calls (71620 primitive calls) in 1.841 seconds
With #22391
- timeit: 5 loops, best of 3: 451 ms per loop
- profiler: 46502 function calls (46434 primitive calls) in 0.570 seconds
With this one
- timeit: 25 loops, best of 3: 11.3 ms per loop
- profiler: 7793 function calls (7747 primitive calls) in 0.031 seconds
As a less contrived example, it now takes 0.41s to get `ReflexivePolytopes(3)` (cached afterwards) instead of 7.61s. Part of the speed up is due to omitting some precomputation, but it is possible to do so because of speed up on demand.
Next goal is not to rely on PALP for computing points of standalone polytopes at all, although for large sets of polytopes it still may be the fastest option.",enhancement,closed,major,sage-8.2,geometry,fixed,sd91,,,Andrey Novoseltsev,Travis Scrimshaw,N/A,,e37e8f7a3280a89ee1328f39fc2e92b045397401,e37e8f7a3280a89ee1328f39fc2e92b045397401,"#22391, #22400",