commit | abbcebec789c7a004ccf0730e58c1efefc56208e | [log] [tgz] |
---|---|---|
author | Mark Canning <argusdusty@gmail.com> | Fri Sep 18 05:34:07 2020 -0700 |
committer | GitHub <noreply@github.com> | Fri Sep 18 14:34:07 2020 +0200 |
tree | ac845bf8b6d40fe244d27c24a07eb8b919c0cbca | |
parent | 8cb5c961a936de0edcb9e0a8fb825d79c0c725e3 [diff] |
stat/distuv: improve Gamma.Rand performances for 0.2 <= alpha < 1 The paper cited in the comment for the a > 1 (now a >= smallAlphaThresh) case mentions this approach as a small note on the final page, so there is no need to update the comments. I also looked into numpy's logic for this case, but a) couldn't determine a source for it, except for what appears to be a more complex variant (Algorithm GS), and b) it's slightly slower than this method, at least for a >= 0.2. benchstat: ``` name old time/op new time/op delta GammaRand/case_0 89.4ns ± 5% 90.2ns ± 3% ~ (p=0.084 n=20+20) GammaRand/case_1 212ns ± 3% 101ns ± 5% -52.28% (p=0.000 n=20+20) GammaRand/case_2 25.4ns ± 3% 25.3ns ± 4% ~ (p=0.369 n=20+20) GammaRand/case_3 48.6ns ± 6% 48.8ns ± 6% ~ (p=0.702 n=20+20) GammaRand/case_4 47.1ns ± 6% 47.6ns ± 3% ~ (p=0.147 n=20+20) ```
The core packages of the Gonum suite are written in pure Go with some assembly. Installation is done using go get
.
go get -u gonum.org/v1/gonum/...
Gonum supports and tests on the two most recent Go releases on Linux (amd64 and arm64), macOS and Windows (both on amd64).
The Gonum modules are released on a six-month release schedule, aligned with the Go releases. i.e.: when Go-1.x
is released, Gonum-v0.n.0
is released around the same time. Six months after, Go-1.x+1
is released, and Gonum-v0.n+1.0
as well.
The release schedule, based on the current Go release schedule is thus:
Gonum-v0.n.0
: FebruaryGonum-v0.n+1.0
: AugustThe Gonum packages use a variety of build tags to set non-standard build conditions. Building Gonum applications will work without knowing how to use these tags, but they can be used during testing and to control the use of assembly and CGO code.
The current list of non-internal tags is as follows:
If you find any bugs, feel free to file an issue on the github issue tracker. Discussions on API changes, added features, code review, or similar requests are preferred on the gonum-dev Google Group.
https://groups.google.com/forum/#!forum/gonum-dev
Original code is licensed under the Gonum License found in the LICENSE file. Portions of the code are subject to the additional licenses found in THIRD_PARTY_LICENSES. All third party code is licensed either under a BSD or MIT license.
Code in graph/formats/dot is dual licensed Public Domain Dedication and Gonum License, and users are free to choose the license which suits their needs for this code.