• Giovanni Bajo's avatar
    runtime: improve comments for nextSample · 8e11cb3f
    Giovanni Bajo authored
    The previous comment of nextSample didn't mention Poisson processes,
    which is the reason why it needed to create an exponential
    distribution, so it was hard to follow the reasoning for people
    not highly familiar with statistics.
    
    Since we're at it, we also make it clear that we are just creating
    a random number with exponential distribution by moving the
    bulk of the function into a new fastexprand().
    
    No functional changes.
    
    Change-Id: I9c275e87edb3418ee0974257af64c73465028ad7
    Reviewed-on: https://go-review.googlesource.com/65657Reviewed-by: 's avatarAustin Clements <austin@google.com>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    8e11cb3f
malloc.go 32.7 KB