bindings: operator (...) for pybind array_t is not efficient
fnrizzi opened this issue · comments
The operator () for pybind::array_t in line 906 of this file is not efficient. I added this myself originally since natively array_t
did not support it.
One reason behind the perf issue is that looking at the impl (traces back to the parent array class, see that same file), it still performs a bound check.
Problem is that inside pressio-demoapps, we are using this to access the graph entries. We should change things to use the mutable
and mutable_unchecked
that seem to perform well since these proxy classes do not perform bounds check. However, we need to figure out how to handle these proxies properly.
we have fixed this in our fork