Andrew Nelson

Results 137 comments of Andrew Nelson
trafficstars

@sturlamolden I'm looking over long test durations and came across [`test_cobyla_threadsafe`](https://github.com/scipy/scipy/blob/main/scipy/optimize/tests/test_optimize.py#L2586) which is one of the longer tests in `optimize`. I wanted to check on why there's a `sleep` in...

Something weird is going on with two of those windows tests. The build step is taking twice as long (~24 mins) as the other (11 min). The fast build uses...

Not using Pythran cuts the time from 24 mins to ~18. But I don't think it's the whole story.

e.g. A long time is spent in [`Framework.get_best_index`](https://github.com/cobyqa/cobyqa/blob/2e3b43b497343caecc3f35175912e6dba2b1d2a9/cobyqa/framework.py#L947). There is a loop in that method that calls [`Framework.merit`](https://github.com/cobyqa/cobyqa/blob/2e3b43b497343caecc3f35175912e6dba2b1d2a9/cobyqa/framework.py#L442) repeatedly. As part of `merit` the constraint violations are calculated. In a...

Most of [this loop](https://github.com/cobyqa/cobyqa/blob/2e3b43b497343caecc3f35175912e6dba2b1d2a9/cobyqa/subsolvers/geometry.py#L186) could be vectorised.

Vectorize [this line](https://github.com/cobyqa/cobyqa/blob/2e3b43b497343caecc3f35175912e6dba2b1d2a9/cobyqa/models.py#L504)

I've started a branch at https://github.com/andyfaff/cobyqa/tree/efficiency that's looking at various efficiency things. This is based on a jupyter notebook where I was line profiling things, https://gist.github.com/andyfaff/4cfdc554f9f520fb1a6a6f983025996f. I'm yet to find...

Future efficiencies could include looking closely `cobyqa.Quadratic`. It's not clear to me why a lot of the methods, viz. `solve_systems`, `fun`, `grad`, `hess`, `hess_prod`, `curve`, are given an interpolation each...