-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kardianos-decomposer
- Loading branch information
Showing
43 changed files
with
867 additions
and
1,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
language: go | ||
|
||
go: | ||
- "1.10.x" | ||
- "1.11.x" | ||
- "1.12.x" | ||
- master | ||
|
||
cache: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Package benchmarks implements benchmarking across decimal packages. | ||
// | ||
// General Notes | ||
// | ||
// 1. Times are measured in seconds, unless otherwise noted | ||
// 2. Measured on a MacBook Pro, 2.9 GHz Intel Core i5, 8 GB 2133 MHz LPDDR3 | ||
// 3. Some benchmarks are adapted from www.bytereef.org/mpdecimal/benchmarks.html | ||
// | ||
// While the benchmarks aim to be as fair as possible, the packages have | ||
// different feature sets and objects. | ||
// | ||
// For example, go-inf/inf[8] boasts the fastest overall runtime of any package, | ||
// but does not fully implement the GDA specification: it lacks contexts, | ||
// non-finite values (NaN, Inf, or ±0), conditions, etc. | ||
// | ||
// Further, programs like cockroachdb/apd[2] sacrifice speed to ensure strict | ||
// compliance with the GDA spec. | ||
// | ||
// In general, package sthat cannot fully complete a challenge will be unranked. | ||
// For example, the ``float64'' type cannot provide 19 or more digits of precision, | ||
// so it's unranked in the Pi test. Similarly so with apmckinlay/dnum[3]. | ||
// | ||
// Pi | ||
// | ||
// Go programs are tested with Go 1.12.2. | ||
// | ||
// Java benchmarks are separated into two categories, warm and cold. Warm | ||
// benchmarks are run 10,000 times prior to benchmarking. | ||
// | ||
// | Program (version) | 9 digits | 19 digits | 38 digits | 100 digits | average | | ||
// |--------------------------------------|----------|-----------|-----------|------------|---------| | ||
// | go-inf/inf[8] | 0.241 | 0.537 | 1.12 | 3.01 | 1.227 | | ||
// | ericlagergren/decimal[1] (mode Go) | 0.142 | 0.639 | 1.46 | 4.16 | 1.60 | | ||
// | Python decimal[5] (Python 3.7.3) | 0.38 | 0.791 | 1.77 | 6.21 | 2.29 | | ||
// | JDK BigDecimal[4] (Java 1.8, warm) | 0.156 | 0.717 | 1.957 | 7.252 | 2.52 | | ||
// | ericlagergren/decimal[1] (mode GDA) | 0.204 | 0.953 | 2.37 | 8.40 | 2.98 | | ||
// | JDK BigDecimal[4] (Java 1.8, cold) | 0.532 | 1.638 | 3.413 | 7.747 | 3.332 | | ||
// | shopspring/decimal[7] decimal | 0.83 | 1.78 | 4.00 | 10.90 | 4.37 | | ||
// | cockroachdb/apd[2] | 1.54 | 7.50 | 43.6 | 237.00 | 72.41 | | ||
// | Python decimal[6] (Python 2.7.10) | 31.81 | 74.502 | 161.71 | 460.00 | 182.00 | | ||
// | float64 | 0.125 | - | - | - | - | | ||
// | double (C LLVM 10.0.1 -O3) | 0.0589 | - | - | - | - | | ||
// | apmckinlay/dnum[3] | 0.078 | - | - | - | - | | ||
// | float (Python 2.7.10, 3.7.3) | 0.0923 | - | - | - | - | | ||
// | ||
// Mandelbrot | ||
// | ||
// Go programs are tested with Go 1.9.?. | ||
// | ||
// | Program (version) | 9 digits | 16 digits | 19 digits | 34 digits | 38 digits | average | | ||
// |--------------------------------------|----------|-----------|-----------|-----------|-----------|---------| | ||
// | ericlagergren/decimal[1] (mode GDA) | 2.73 | 9.07 | 14.54 | 24.95 | 25.09 | 15.27 | | ||
// | ericlagergren/decimal[1] (mode Go) | 2.73 | 9.70 | 15.02 | 26.13 | 26.62 | 16.04 | | ||
// | float64 | 0.0034 | - | - | - | - | - | | ||
// | ||
// References | ||
// | ||
// Further information and references can be found at the links below. | ||
// | ||
// [1]: github.com/ericlagergren/decimal | ||
// [2]: github.com/cockroachdb/apd | ||
// [3]: github.com/apmckinlay/gsuneido/util/dnum | ||
// [4]: docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html | ||
// [5]: docs.python.org/3.6/library/decimal.html | ||
// [6]: docs.python.org/2/library/decimal.html | ||
// [7]: github.com/shopspring/decimal | ||
// [8]: github.com/go-inf/inf | ||
// | ||
package benchmarks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.