package main
func main() {
- for i := 0; i < 1000000; i++ {
+ for i := 0; i < 1e5; i++ {
x := new([100]byte);
_ = x;
}
import "rand"
-const Count = 1e6
+const Count = 1e5
func
i64rand() int64
import "rand"
-const Count = 1e6
+const Count = 1e5
func
i64rand() int64
flag.Parse();
// prime();
var blocks [1] struct { base *byte; siz uintptr; };
- for i := 0; i < 1<<12; i++ {
+ for i := 0; i < 1<<10; i++ {
if i%(1<<10) == 0 && *chatty {
println(i);
}
func main() {
flag.Parse();
malloc.GetStats().Alloc = 0; // ignore stacks
- for i := 0; i < 1<<8; i++ {
+ for i := 0; i < 1<<7; i++ {
for j := 1; j <= 1<<22; j<<=1 {
if i == 0 && *chatty {
println("First alloc:", j);
AllocAndFree(atoi(flag.Arg(0)), atoi(flag.Arg(1)));
return;
}
- for j := 1; j <= 1<<22; j<<=1 {
+ maxb := 1<<22;
+ if !*longtest {
+ maxb = 1<<19;
+ }
+ for j := 1; j <= maxb; j<<=1 {
n := len(b);
max := uintptr(1<<28);
if !*longtest {
- max = 1<<22;
+ max = uintptr(maxb);
}
if uintptr(j)*uintptr(n) > max {
n = int(max / uintptr(j));
"strconv";
)
-const arraylen = 2; // BUG: shouldn't need this
+const count = 100;
func P(a []string) string {
s := "{";
type M map[int] int;
mipM := make(map[int] M);
- const count = 1000;
var apT [2*count]*T;
for i := 0; i < count; i++ {
msi[s] = i;
mss[s] = s10;
mss[s] = s10;
- as := make([]string, arraylen);
+ as := make([]string, 2);
as[0] = s10;
as[1] = s10;
mspa[s] = as;
if mss[s] != s10 {
fmt.Printf("mss[%s] = %g\n", s, mss[s]);
}
- for j := 0; j < arraylen; j++ {
+ for j := 0; j < len(mspa[s]); j++ {
if mspa[s][j] != s10 {
fmt.Printf("mspa[%s][%d] = %s\n", s, j, mspa[s][j]);
}
func main() {
verify();
- for i := 0; i <= 10; i++ {
+ for i := 0; i <= 9; i++ {
print(i, "! = ", count(fact(gen(i))), "\n");
}
}
RUNFILE=/tmp/gorun-$$-$USER
TMP1FILE=/tmp/gotest1-$$-$USER
TMP2FILE=/tmp/gotest2-$$-$USER
+TMP3FILE=/tmp/gotest3-$$-$USER
# don't run the machine out of memory: limit individual processes to 4GB.
# on thresher, 3GB suffices to run the tests; with 2GB, peano fails.
ulimit -v 4000000
-true >pass.out
+true >pass.out >times.out
for dir in . ken chan interface fixedbugs bugs
do
export F=$(basename $i .go)
export D=$dir
sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|' >$RUNFILE
- if ! sh $RUNFILE >$TMP1FILE 2>$TMP2FILE
+ if ! /usr/bin/time -p sh -c "sh $RUNFILE >$TMP1FILE 2>$TMP2FILE" 2>$TMP3FILE
then
echo
echo "===========" $i
else
echo $i >>pass.out
fi
+ echo $(awk 'NR==1{print $2}' $TMP3FILE) $D/$F >>times.out
done
done | # clean up some stack noise
egrep -v '^(r[0-9a-z]+|[cfg]s) +0x' |
1)
echo FAIL
esac
-rm -f $RUNFILE $TMP1FILE $TMP2FILE *.$A $A.out
+rm -f $RUNFILE $TMP1FILE $TMP2FILE $TMP3FILE *.$A $A.out
diffmsg=""
if ! diff run.out golden.out
then