Just some helpful links to follow up on what @antoine-levitt suggested:
- How to quote your code on Discourse: PSA: how to quote code with backticks
- Performance tips from the manual: https://docs.julialang.org/en/stable/manual/performance-tips/#@code_warntype
- BenchmarkTools, for accurately measuring the performance of your code: GitHub - JuliaCI/BenchmarkTools.jl: A benchmarking framework for the Julia language
- ProfileView, for visually identifying bottlenecks in code: GitHub - timholy/ProfileView.jl: Visualization of Julia profiling data