Closed Luthaf closed 1 month ago
Instead we can exploit the underlying HashMap structure of Labels.
Fixes #319, bringing the calculation down to 2.5s on my machine. There might be more optimizations to do here, but at least the worst issue is gone.
╔════╦══════════════════════════════════════════════╦════════════╦═══════════╦══════════╦══════════╗ ║ id ║ span name ║ call count ║ called by ║ total ║ mean ║ ╠════╬══════════════════════════════════════════════╬════════════╬═══════════╬══════════╬══════════╣ ║ 1 ║ Calculator::prepare ║ 1 ║ — ║ 1.65s ║ 1.65s ║ ╠════╬══════════════════════════════════════════════╬════════════╬═══════════╬══════════╬══════════╣ ║ 0 ║ NeighborsList ║ 1 ║ 1 ║ 375.89ms ║ 375.89ms ║ ╠════╬══════════════════════════════════════════════╬════════════╬═══════════╬══════════╬══════════╣ ║ 2 ║ NeighborList::compute ║ 1 ║ — ║ 786.14ms ║ 786.14ms ║ ╚════╩══════════════════════════════════════════════╩════════════╩═══════════╩══════════╩══════════╝
📚 Documentation preview 📚: https://rascaline--320.org.readthedocs.build/en/320/
Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip and using pip to install the file matching your system
wheels.zip
pip
Instead we can exploit the underlying HashMap structure of Labels.
Fixes #319, bringing the calculation down to 2.5s on my machine. There might be more optimizations to do here, but at least the worst issue is gone.
📚 Documentation preview 📚: https://rascaline--320.org.readthedocs.build/en/320/