better / convoys

Implementation of statistical models to analyze time lagged conversions
https://better.engineering/convoys/
MIT License
260 stars 42 forks source link

Speed up plotting using numpy #129

Closed adsglass closed 4 years ago

adsglass commented 4 years ago

Just replaced the slow TODOs with some optimized numpy operations to speed up the plotting.

For a group size of 4 on the little snippet of code before the if ci..., the time taken on the loop improves from 248 ms ± 3.14 ms per loop to 960 µs ± 14.2 µs per loop. All unit tests pass.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 94.988% when pulling 8a4905e1b5ee08ba3b98038a4bc613c8232e687d on adsglass:speed-up-plotting into 683e08cd93d136a06c8d9ea170877c622f699ac2 on better:master.

erikbern commented 4 years ago

nice! thanks @adsglass