QuiverTools / QuiverTools.jl

A Julia package to deal with quivers and moduli of quiver representations.
https://julia.quiver.tools
MIT License
2 stars 0 forks source link

Type coercion causes unintended coercions #3

Closed giannipetrella closed 3 weeks ago

giannipetrella commented 3 weeks ago

Using Abstract types seems to be causing a large amount of allocations. For instance,

julia> @time Q = three_vertex_quiver(1, 6, 5); d = [1, 6, 6]; theta = canonical_stability(Q, d);
  0.000005 seconds (2 allocations: 160 bytes)

should let the following code run for free, however it is even more expensive than the former:

julia> @time M = QuiverModuliSpace(Q, d, theta);
  0.000026 seconds (5 allocations: 224 bytes)

Some refactoring seems necessary.

giannipetrella commented 3 weeks ago

The constructors are not really a problem, in any case the issue is fixed in 2e2168a0fdf07045ec5e5d93e0b20f2c7337a94f and 1de4eba5eddfac9559843510469a5348fc4a332e.