> Your code is too slow? Learn a more performant language (C++, Rust, Triton) and write things there.
What? There might be another technical reason where x language is being slow due to y decision. Just rewriting in faster language is bottleneck for the future.
When I did my PhD, there were 2 things at play.
1. Most of the stuff you did was just for the paper, you don't need to put it in production or worry about maintenance, so quick wins are worthwhile
2. Writing something a 2nd time (especially in the pre-GenAI LLM era) really forced you to reimplement the details and double check 'did you really understand the reference algorithm or did you hand-wave over the details'
Typically a mixture of 2 would help you overcome the immediate roadblock and guide you to do the next most obvious thing to get your paper or review out.
'Thinking about the future' is almost never something I thought about!