A couple of questions:
- What Julia version are you running?
- Just to confirm: If you keep on running
@benchmark StandardBasisVectors.standardize_basis($Q)
then at some point the code will slow down? You don’t do anything else? - The link to your profile does not work for me.
While reading, my first suspicion was an interaction between GC, threading and calls to external libraries (like in this recent thread). But your code is just some normal Julia loops, no long BLAS operations and no multi-threading… So it indeed seems very odd that Task scheduling should be to blame for this slowdown. I am not even sure where Tasks come into the picture… Maybe the profile sheds some light on this.