diff options
author | Rob Pike <r@golang.org> | 2009-08-07 10:39:45 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-08-07 10:39:45 -0700 |
commit | f53442a47c52e8368f34f6f911a485bf513ea1cf (patch) | |
tree | f1b0f32b562d611989a9b34cf40ef31de7a89f1c /test/bench | |
parent | 4e00ffed3bd47ea93efef2e7e91cb4f3e3b16df4 (diff) | |
download | go-f53442a47c52e8368f34f6f911a485bf513ea1cf.tar.gz |
timing updates after 6g change for efficient division by powers of two
R=rsc
DELTA=25 (23 added, 0 deleted, 2 changed)
OCL=32873
CL=32875
Diffstat (limited to 'test/bench')
-rw-r--r-- | test/bench/spectral-norm-parallel.go | 2 | ||||
-rw-r--r-- | test/bench/timing.log | 23 | ||||
-rwxr-xr-x | test/bench/timing.sh | 2 |
3 files changed, 25 insertions, 2 deletions
diff --git a/test/bench/spectral-norm-parallel.go b/test/bench/spectral-norm-parallel.go index 9e7f33885..68aaedea6 100644 --- a/test/bench/spectral-norm-parallel.go +++ b/test/bench/spectral-norm-parallel.go @@ -47,7 +47,7 @@ var n = flag.Int("n", 2000, "count") var nCPU = flag.Int("ncpu", 4, "number of cpus") func evalA(i, j int) float64 { - return 1 / float64(((i + j)*(i + j + 1)>>1+ i + 1)); + return 1 / float64(((i + j)*(i + j + 1)/2 + i + 1)); } type Vec []float64 diff --git a/test/bench/timing.log b/test/bench/timing.log index 43293665d..8fbf43a44 100644 --- a/test/bench/timing.log +++ b/test/bench/timing.log @@ -92,3 +92,26 @@ pidigits 10000 gc pidigits 77.69u 0.14s 78.18r gc_B pidigits 74.26u 0.18s 75.41r gc_B pidigits 68.48u 0.20s 69.31r # special case: no bounds checking in bignum + +August 7 2009 + +# New gc does better division by powers of 2. Significant improvements: + +spectral-norm 5500 + gcc -O2 spectral-norm.c -lm 11.50u 0.00s 11.50r + gccgo -O2 spectral-norm.go 12.02u 0.00s 12.02r + gc spectral-norm 23.98u 0.00s 24.00r # new time is 0.48 times old time, 52% faster + gc_B spectral-norm 23.71u 0.01s 23.72r # ditto + gc spectral-norm-parallel 24.04u 0.00s 6.26r # /2 put back. note: 4x faster (on r70, idle) + +k-nucleotide 1000000 + gcc -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include k-nucleotide.c -lglib-2.0 10.82u 0.04s 10.87r + gccgo -O2 k-nucleotide.go 22.73u 0.89s 23.63r + gc k-nucleotide 15.97u 0.03s 16.04r + gc_B k-nucleotide 15.86u 0.06s 15.93r # 8.5% faster, but probably due to weird cache effeccts in previous version + +pidigits 10000 + gcc -O2 pidigits.c -lgmp 2.58u 0.00s 2.58r + gc pidigits 71.24u 0.04s 71.28r # 8.5% faster + gc_B pidigits 71.25u 0.03s 71.29r # 4% faster + diff --git a/test/bench/timing.sh b/test/bench/timing.sh index a8cc9e003..233e381c6 100755 --- a/test/bench/timing.sh +++ b/test/bench/timing.sh @@ -121,7 +121,7 @@ pidigits() { case $# in 0) - run="fasta revcom nbody binarytree fannkuch regexdna spectralnorm knucleotide mandelbrot meteor pidigits" + run="fasta revcomp nbody binarytree fannkuch regexdna spectralnorm knucleotide mandelbrot meteor pidigits" ;; *) run=$* |