How can I make my Julia code run faster?

Hi Everyone, I’m Soumitra Dutta – Entrepreneur & Photographer Based in Oxford. I’m trying to improve the performance of some Julia code I’m working on. Are there any tips, tricks, or best practices you’d recommend for making Julia code run faster? I’d love to hear your suggestions or see examples of optimizations that have worked well for you.

Regards
Soumitra Dutta

1 Like

Hello and welcome to the community :waving_hand:
Have a look at

1 Like

There’s a good philosophical take with a deep dive into Kruth’s famous admonition about premature optimization. Another look includes Brian Kernighan’s advice to look for a better algorithm before fine tuning performance.

Fredrik’s link is pretty much the correct answer, but once you’ve satisfied yourself that all of the points made on that page are covered (and maybe you got Claude or similar to look over it as well) the secret trick is to profile your code to find out where the bottleneck is, isolate that bottleneck into a small, self contained example, and then post it on this forum to ask for help with optimizing it.

1 Like