1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:44:39 -07:00
go/src
Evan Shaw 4f445d2744 big: reduce the number of allocations
There was a bug in makeN that caused lots of unnecessary
allocations.  Fixing this exposed a few bugs in other
functions which worked when makeN allocated a new slice, but
failed when it simply resized an existing slice.  The result
is a pretty big performance improvement.  When running
pidigits, here were the numbers I got on amd64:

Before this change:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.02s 2.11r
        gc pidigits     12.68u 0.04s 12.72r
        gc_B pidigits   12.71u 0.03s 12.75r

After:
pidigits 10000
        gcc -O2 pidigits.c -lgmp        2.09u 0.00s 2.10r
        gc pidigits     6.82u 0.00s 6.85r
        gc_B pidigits   6.55u 0.01s 6.59r

R=rsc, gri
CC=golang-dev
https://golang.org/cl/953042
2010-04-20 21:24:07 -07:00
..
cmd 6l, 8l: include ELF header in PT_LOAD mapping for text segment 2010-04-20 20:39:55 -07:00
lib9 *l/*c: add -V flag to display version number 2010-02-08 09:46:53 -08:00
libbio Ports of lib9, libbio and libmach to Windows. 2009-11-30 11:53:11 -08:00
libcgo Library support for cgo export. 2010-04-09 13:30:35 -07:00
libmach gc: implement panic and recover 2010-03-31 11:46:01 -07:00
pkg big: reduce the number of allocations 2010-04-20 21:24:07 -07:00
all-arm.bash arm: toss make-arm.bash 2010-02-03 20:46:37 -08:00
all-nacl.bash nacl: fix build, finally fixed 8l convergence bug 2010-02-01 15:20:19 -08:00
all.bash build script tweaks 2010-03-31 19:48:33 -07:00
clean.bash add simple garbage collector benchmarks to dashboard 2010-02-09 13:33:00 -08:00
env.bash build script tweaks 2010-03-31 19:48:33 -07:00
Make.386 makefile fixes; convert runtime to use new makefiles 2009-08-13 14:41:10 -07:00
Make.amd64 makefile fixes; convert runtime to use new makefiles 2009-08-13 14:41:10 -07:00
Make.arm makefile fixes; convert runtime to use new makefiles 2009-08-13 14:41:10 -07:00
make.bash build script tweaks 2010-03-31 19:48:33 -07:00
Make.cmd Make.cmd: make 'all' the default target (was 'clean': BUG) 2010-03-19 16:33:27 -07:00
Make.common Factor the Makefiles to make writing outside Makefiles easier. 2010-03-19 15:14:46 -07:00
Make.conf Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of 2010-01-06 07:47:56 -08:00
Make.pkg Add //export to cgo. 2010-04-09 13:31:05 -07:00
quietgcc.bash Build changes to support work on the BSDs. 2009-11-14 15:29:09 -08:00
run.bash run.bash: remove MAKEFLAGS=-j4 to prevent crashing on freebsd 2010-04-05 10:53:38 +10:00
sudo.bash go: makes it build for the case $GOROOT has whitespaces 2009-11-23 17:32:51 -08:00
version.bash version.bash: cope with ancient Mercurial 2010-03-16 18:45:06 -07:00