Meeting 09/2024
Program Tuning Julia code Location Participants

Tuning Julia code

Preparation

Allocations

julia> n=2; R=QQ; @btime S, _ = polynomial_ring(R, "y" => 1:n, "t" => 1:n);
  3.271 μs (83 allocations: 3.50 KiB)

julia> n=2; R=QQ; @btime S, _ = polynomial_ring(R, :y => 1:n, :t => 1:n);
  2.319 μs (51 allocations: 2.27 KiB)
julia> S, (y,t) = polynomial_ring(R, :y => 1:n, :t => 1:n);

julia> @btime gens(S)[1:n];
  431.950 ns (15 allocations: 688 bytes)

julia> @btime y;
  1.500 ns (0 allocations: 0 bytes)
julia> @btime length(gens(S));
  407.797 ns (13 allocations: 592 bytes)

julia> @btime ngens(S);
  46.638 ns (0 allocations: 0 bytes)

Some OSCAR case studies

@ experimental/FTheoryTools/test/literature_models.jl:1 @
# runs 400 seconds, allocates 80 GB

@ experimental/FTheoryTools/test/tate_models.jl:1 @
# runs 215 seconds, allocates 65 GB

@ test/AlgebraicGeometry/Schemes/elliptic_surface.jl:1 @
# runs 480 seconds, allocates 122 GB

Some Relevant packages

Measuring

Profiling

Type stability

Other

Edit this page Contact Imprint Privacy policy © 2018-2024 The OSCAR Team