-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dec/amd64: unroll loops in div10VV/add10VV
- Loading branch information
Showing
4 changed files
with
221 additions
and
59 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
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,3 +1,5 @@ | ||
module github.com/db47h/decimal | ||
|
||
go 1.14 | ||
|
||
require golang.org/x/tools v0.0.0-20200513122804-866d71a3170a // indirect |
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,12 @@ | ||
#!/bin/bash | ||
|
||
TEST="$1" | ||
shift | ||
|
||
go test -v -run ^$ -bench "$TEST" -cpu 1 -count 5 -tags decimal_pure_go "$@" | tee bench-go | ||
go test -v -run ^$ -bench "$TEST" -cpu 1 -count 5 "$@" | tee bench-asm | ||
|
||
benchstat bench-go bench-asm | ||
|
||
rm bench-go | ||
rm bench-asm |
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,42 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
REV="$1" | ||
shift | ||
TEST="$1" | ||
shift | ||
|
||
if [ -z "$REV" ]; then | ||
echo "no commit to compare to" | ||
exit | ||
fi | ||
|
||
if [ -z "$TEST" ]; then | ||
TEST="." | ||
fi | ||
|
||
function doBench { | ||
local TEST="$1" | ||
shift | ||
local REV="$1" | ||
shift | ||
echo $TEST - $REV | ||
go test -v -run ^$ -bench "$TEST" -cpu 1 -count 5 "$@" | tee bench-"$REV" | ||
} | ||
|
||
if [ "$REV" == "master" ]; then | ||
# compare current against master | ||
git stash | ||
doBench "$TEST" "$REV" "$@" | ||
git stash pop | ||
else | ||
git checkout "$REV" | ||
doBench "$TEST" "$REV" "$@" | ||
git checkout master | ||
fi | ||
|
||
doBench "$TEST" "current" "$@" | ||
|
||
benchstat bench-"$REV" bench-current | ||
|
||
rm bench-"$REV" bench-current |