Test of expand and substitute in Symbolics.jl, SymEngine.jl and Mathematica

julia> for i in 1:10
           @time f = (x + i * y)^5000 |>expand
       end
  5.883341 seconds (10.36 M allocations: 1.695 GiB, 6.25% gc time, 0.07% compilation time)
  0.008549 seconds (39.72 k allocations: 3.583 MiB)
  5.866237 seconds (10.36 M allocations: 1.694 GiB, 5.82% gc time)
  0.002496 seconds (13.64 k allocations: 1.154 MiB)
  6.197537 seconds (10.36 M allocations: 1.694 GiB, 9.01% gc time)
  0.008952 seconds (39.72 k allocations: 3.582 MiB)
  5.930975 seconds (10.36 M allocations: 1.694 GiB, 5.82% gc time)
  0.001464 seconds (7.69 k allocations: 619.297 KiB)
  6.237053 seconds (10.36 M allocations: 1.694 GiB, 10.19% gc time)
  0.011223 seconds (39.72 k allocations: 3.582 MiB)