flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

Speed up action of a matrix on a polygon #153

Closed saraedum closed 2 years ago

saraedum commented 2 years ago

In this trivial example, the runtime goes from 122µs to 66μs.

sage: from flatsurf import polygons
sage: p = polygons(vertices = [(1,0),(0,1),(-1,-1)])
sage: r = matrix(ZZ,[[0,1], [1,0]])
sage: %timeit r*p