]> Cypherpunks repositories - gostls13.git/commit
runtime: improve comments for nextSample
authorGiovanni Bajo <rasky@develer.com>
Sun, 24 Sep 2017 16:13:26 +0000 (18:13 +0200)
committerAustin Clements <austin@google.com>
Tue, 26 Sep 2017 16:28:35 +0000 (16:28 +0000)
commit8e11cb3f3b5e383023736172bcbfd847ea529176
tree820c9b594c0cdb61112d4d9a8019ce30bd97f635
parent3f04db41a8dbf6f64304f3e1d34b4c7775fbe55e
runtime: improve comments for nextSample

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/65657
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/malloc.go