Revision 7570569e
ID | 7570569ea4bad9f97204a39a4c8fca97e0e6b16c |
Improve the standard deviation computation
This does just two passes, instead of three, over the list. This reduces
the overall runtime well enough (~25%) in some tests, but it's not
reproducible using profiling, so I don't know how much the function
itself is being sped-up.
Note: this is written via `seq`s, and not BangPatterns. Since it's just
one case, adding BangPatterns just for it wasn't a big gain.
Thanks to Lécz Balázs for the impetus to improve this!
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Balazs Lecz <leczb@google.com>
Files
- added
- modified
- copied
- renamed
- deleted