Skip to content
  • Iustin Pop's avatar
    Improve the standard deviation computation · 7570569e
    Iustin Pop authored
    
    
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
    7570569e