scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
279 stars 83 forks source link

Consider using opt.einsum #510

Open kratsg opened 5 years ago

kratsg commented 5 years ago

Description

See opt-einsum here: https://optimized-einsum.readthedocs.io/en/latest/ . A large majority of the mathematical code we write, especially for tensorization, relies on being able to use einsum effectively. It seems possible to get speed-ups, even there.

lukasheinrich commented 5 years ago

I did at some point and didn't see much improvement. I think opt.einsum is useful if you do einsums with more than two tensors which I think we don't. (but maybe we can rewrite things in this way?) definitely worth looking at again