1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:47:57 -07:00

Sqrt in assembler is worth 3-4X for nbody

R=rsc
DELTA=10  (10 added, 0 deleted, 0 changed)
OCL=34987
CL=34987
This commit is contained in:
Rob Pike 2009-09-24 14:47:34 -07:00
parent 86b119f765
commit f448057b8a

View File

@ -388,3 +388,13 @@ threadring 50000000
chameneos 6000000
gc chameneosredux 26.62u 0.00s 26.63r # +13%
Sep 24, 2009
# Sqrt now in assembler for 6g.
nbody -n 50000000
# remember, at least for 6g, alignment of loops may be important
gcc -O2 nbody.c 21.24u 0.00s 21.25r
gccgo -O2 nbody.go 121.03u 0.00s 121.04r
gc nbody 30.26u 0.00s 30.27r # -65% ***
gc_B nbody 30.20u 0.02s 30.22r # -72% ***