Hey! Iβm new to Julia (coming from Python) and was trying to benchmark Julia against a part of the apricot python package (submodular optimization). Unfortunately the Python version (using numba) is still a bit faster (1.5x). I read through the Performance optimization chapter and applied the following already:
- put core components into functions,
- used views for array slices,
- using Threads for parallel for loops,
- using fastmath,
- using column first orientation.
I asked in the Julia Slack and based on someones recommendation we improved the code by 10x but the key part (the calculate_gains function) is still slower than numba.
Hereβs the code: https://github.com/rmeinl/apricot-julia (in notebooks/ youβll find python_reimpl and julia_reimpl ). Was wondering if anyone had any recommendations on what I could further improve.