summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2009-12-04Add os.Rename.Ian Lance Taylor2-1/+31
R=rsc http://codereview.appspot.com/166058
2009-12-04Remove global chanlock.Adam Langley1-33/+75
On a microbenchmark that ping-pongs on lots of channels, this makes the multithreaded case about 20% faster and the uniprocessor case about 1% slower. (Due to cache effects, I expect.) R=rsc, agl CC=golang-dev http://codereview.appspot.com/166043
2009-12-04bytes: asm for bytes.IndexByteRuss Cox7-1/+96
PERFORMANCE DIFFERENCE SUMMARY amd64 386 2.2 GHz AMD Opteron 8214 HE (Linux) 3.0x faster 8.2x faster 3.60 GHz Intel Xeon (Linux) 2.2x faster 6.2x faster 2.53 GHz Intel Core2 Duo E7200 (Linux) 1.5x faster 4.4x faster 2.66 Ghz Intel Xeon 5150 (Mac Pro, OS X) 1.5x SLOWER 3.0x faster 2.33 GHz Intel Xeon E5435 (Linux) 1.5x SLOWER 3.0x faster 2.33 GHz Intel Core2 T7600 (MacBook Pro, OS X) 1.4x SLOWER 3.0x faster 1.83 GHz Intel Core2 T5600 (Mac Mini, OS X) none* 3.0x faster * but yesterday I consistently saw 1.4x SLOWER. DETAILS 2.2 GHz AMD Opteron 8214 HE (Linux) amd64 (3x faster) IndexByte4K 500000 3733 ns/op 1097.24 MB/s IndexByte4M 500 4328042 ns/op 969.10 MB/s IndexByte64M 50 67866160 ns/op 988.84 MB/s IndexBytePortable4K 200000 11161 ns/op 366.99 MB/s IndexBytePortable4M 100 11795880 ns/op 355.57 MB/s IndexBytePortable64M 10 188675000 ns/op 355.68 MB/s 386 (8.2x faster) IndexByte4K 500000 3734 ns/op 1096.95 MB/s IndexByte4M 500 4209954 ns/op 996.28 MB/s IndexByte64M 50 68031980 ns/op 986.43 MB/s IndexBytePortable4K 50000 30670 ns/op 133.55 MB/s IndexBytePortable4M 50 31868220 ns/op 131.61 MB/s IndexBytePortable64M 2 508851500 ns/op 131.88 MB/s 3.60 GHz Intel Xeon (Linux) amd64 (2.2x faster) IndexByte4K 500000 4612 ns/op 888.12 MB/s IndexByte4M 500 4835250 ns/op 867.44 MB/s IndexByte64M 20 77388450 ns/op 867.17 MB/s IndexBytePortable4K 200000 10306 ns/op 397.44 MB/s IndexBytePortable4M 100 11201460 ns/op 374.44 MB/s IndexBytePortable64M 10 179456800 ns/op 373.96 MB/s 386 (6.3x faster) IndexByte4K 500000 4631 ns/op 884.47 MB/s IndexByte4M 500 4846388 ns/op 865.45 MB/s IndexByte64M 20 78691200 ns/op 852.81 MB/s IndexBytePortable4K 100000 28989 ns/op 141.29 MB/s IndexBytePortable4M 50 31183180 ns/op 134.51 MB/s IndexBytePortable64M 5 498347200 ns/op 134.66 MB/s 2.53 GHz Intel Core2 Duo E7200 (Linux) amd64 (1.5x faster) IndexByte4K 500000 6502 ns/op 629.96 MB/s IndexByte4M 500 6692208 ns/op 626.74 MB/s IndexByte64M 10 107410400 ns/op 624.79 MB/s IndexBytePortable4K 200000 9721 ns/op 421.36 MB/s IndexBytePortable4M 100 10013680 ns/op 418.86 MB/s IndexBytePortable64M 10 160460800 ns/op 418.23 MB/s 386 (4.4x faster) IndexByte4K 500000 6505 ns/op 629.67 MB/s IndexByte4M 500 6694078 ns/op 626.57 MB/s IndexByte64M 10 107397600 ns/op 624.86 MB/s IndexBytePortable4K 100000 28835 ns/op 142.05 MB/s IndexBytePortable4M 50 29562680 ns/op 141.88 MB/s IndexBytePortable64M 5 473221400 ns/op 141.81 MB/s 2.66 Ghz Intel Xeon 5150 (Mac Pro, OS X) amd64 (1.5x SLOWER) IndexByte4K 200000 9290 ns/op 440.90 MB/s IndexByte4M 200 9568925 ns/op 438.33 MB/s IndexByte64M 10 154473600 ns/op 434.44 MB/s IndexBytePortable4K 500000 6202 ns/op 660.43 MB/s IndexBytePortable4M 500 6583614 ns/op 637.08 MB/s IndexBytePortable64M 20 107166250 ns/op 626.21 MB/s 386 (3x faster) IndexByte4K 200000 9301 ns/op 440.38 MB/s IndexByte4M 200 9568025 ns/op 438.37 MB/s IndexByte64M 10 154391000 ns/op 434.67 MB/s IndexBytePortable4K 100000 27526 ns/op 148.80 MB/s IndexBytePortable4M 100 28302490 ns/op 148.20 MB/s IndexBytePortable64M 5 454170200 ns/op 147.76 MB/s 2.33 GHz Intel Xeon E5435 (Linux) amd64 (1.5x SLOWER) IndexByte4K 200000 10601 ns/op 386.38 MB/s IndexByte4M 100 10827240 ns/op 387.38 MB/s IndexByte64M 10 173175500 ns/op 387.52 MB/s IndexBytePortable4K 500000 7082 ns/op 578.37 MB/s IndexBytePortable4M 500 7391792 ns/op 567.43 MB/s IndexBytePortable64M 20 122618550 ns/op 547.30 MB/s 386 (3x faster) IndexByte4K 200000 11074 ns/op 369.88 MB/s IndexByte4M 100 10902620 ns/op 384.71 MB/s IndexByte64M 10 181292800 ns/op 370.17 MB/s IndexBytePortable4K 50000 31725 ns/op 129.11 MB/s IndexBytePortable4M 50 32564880 ns/op 128.80 MB/s IndexBytePortable64M 2 545926000 ns/op 122.93 MB/s 2.33 GHz Intel Core2 T7600 (MacBook Pro, OS X) amd64 (1.4x SLOWER) IndexByte4K 200000 11120 ns/op 368.35 MB/s IndexByte4M 100 11531950 ns/op 363.71 MB/s IndexByte64M 10 184819000 ns/op 363.11 MB/s IndexBytePortable4K 500000 7419 ns/op 552.10 MB/s IndexBytePortable4M 200 8018710 ns/op 523.06 MB/s IndexBytePortable64M 10 127614900 ns/op 525.87 MB/s 386 (3x faster) IndexByte4K 200000 11114 ns/op 368.54 MB/s IndexByte4M 100 11443530 ns/op 366.52 MB/s IndexByte64M 10 185212000 ns/op 362.34 MB/s IndexBytePortable4K 50000 32891 ns/op 124.53 MB/s IndexBytePortable4M 50 33930580 ns/op 123.61 MB/s IndexBytePortable64M 2 545400500 ns/op 123.05 MB/s 1.83 GHz Intel Core2 T5600 (Mac Mini, OS X) amd64 (no difference) IndexByte4K 200000 13497 ns/op 303.47 MB/s IndexByte4M 100 13890650 ns/op 301.95 MB/s IndexByte64M 5 222358000 ns/op 301.81 MB/s IndexBytePortable4K 200000 13584 ns/op 301.53 MB/s IndexBytePortable4M 100 13913280 ns/op 301.46 MB/s IndexBytePortable64M 10 222572600 ns/op 301.51 MB/s 386 (3x faster) IndexByte4K 200000 13565 ns/op 301.95 MB/s IndexByte4M 100 13882640 ns/op 302.13 MB/s IndexByte64M 5 221411600 ns/op 303.10 MB/s IndexBytePortable4K 50000 39978 ns/op 102.46 MB/s IndexBytePortable4M 50 41038160 ns/op 102.20 MB/s IndexBytePortable64M 2 656362500 ns/op 102.24 MB/s R=r CC=golang-dev http://codereview.appspot.com/166055
2009-12-04make Native Client support build again,Russ Cox16-20/+155
add README explaining how to try the web demos. Fixes issue 339. R=r CC=barry.d.silverman, bss, vadim http://codereview.appspot.com/165057
2009-12-04testing: compute MB/s in benchmarksRuss Cox1-1/+11
R=r http://codereview.appspot.com/166060
2009-12-04avoid an allocation inside bytes.Buffer by providing a static array.Rob Pike1-8/+4
R=rsc http://codereview.appspot.com/165058
2009-12-038l: fix print line number format, buffer overflowRuss Cox1-4/+4
R=ken2 http://codereview.appspot.com/165059
2009-12-03net: turn off empty packet test by defaultRuss Cox1-2/+9
Fixes issue 374. R=r http://codereview.appspot.com/166053
2009-12-03gc: check for assignment to private fields during initializationRuss Cox1-2/+6
R=ken2 http://codereview.appspot.com/165055
2009-12-036g code gen bugKen Thompson2-11/+6
R=rsc http://codereview.appspot.com/166052
2009-12-03Add Count, Cycle, ZipWith, GroupBy, Repeat, RepeatTimes, Unique to exp/iterable.Michael Elkins2-25/+363
Modify iterFunc to take chan<- instead of just chan. R=rsc, dsymonds1 CC=golang-dev, r http://codereview.appspot.com/160064 Committer: Russ Cox <rsc@golang.org>
2009-12-03crypto/rsa: fix shadowing error.Adam Langley1-2/+2
Fixes bug 375. R=rsc http://codereview.appspot.com/165045
2009-12-03runtime: fix Caller crash on 386.Russ Cox1-2/+2
Fixes issue 176. R=r http://codereview.appspot.com/166044
2009-12-03Make.conf: fix if $HOME has spacesRuss Cox1-1/+4
R=r http://codereview.appspot.com/164086
2009-12-03runtime: malloc fixesRuss Cox8-110/+40
* throw away dead code * add mlookup counter * add malloc counter * set up for blocks with no pointers Fixes issue 367. R=r http://codereview.appspot.com/165050
2009-12-03The String() method requires global state that makes it not work outside of ↵Rob Pike3-17/+17
this package, so make it a local method (_String()). R=rsc CC=golang-dev http://codereview.appspot.com/165049
2009-12-03error propagation in gob/encoder.Rob Pike1-11/+27
R=rsc CC=golang-dev http://codereview.appspot.com/165048
2009-12-03Add ReadFrom and WriteTo methods to bytes.Buffer, to enable i/o without ↵Rob Pike5-5/+194
buffer allocation. Use them in Copy and Copyn. Speed up ReadFile by using ReadFrom and avoiding Copy altogether (a minor win). R=rsc, gri CC=golang-dev http://codereview.appspot.com/166041
2009-12-03gc: Allow allow data types up to 1GBChristopher Wedgwood3-3/+4
R=rsc http://codereview.appspot.com/164095 Committer: Russ Cox <rsc@golang.org>
2009-12-03- include type-associated consts and vars when filtering a PackageDocRobert Griesemer1-7/+9
- fixes a godoc issue (for instance, "godoc os EOF" now shows an entry) R=r CC=rsc http://codereview.appspot.com/165042
2009-12-03gc: handle _ = <-c in select.Russ Cox1-1/+1
Fixes issue 238. R=ken2 http://codereview.appspot.com/163098
2009-12-03gc: recursive type errorRuss Cox2-0/+5
Fixes issue 245. R=ken2 http://codereview.appspot.com/164094
2009-12-03gc: better diagnosis of initialization loopsRuss Cox5-8/+67
Fixes bug 292. R=ken2 http://codereview.appspot.com/164093
2009-12-03gc: minor import grammar bug fixesRuss Cox1-8/+27
Fixes issue 364. R=ken2 http://codereview.appspot.com/164092
2009-12-03minor improvement to formatting: don't allocate padding strings every time.Rob Pike1-12/+19
R=rsc http://codereview.appspot.com/164090
2009-12-02gc: function argument ordering bugRuss Cox1-5/+5
Fixes issue 370. R=ken2 http://codereview.appspot.com/163097
2009-12-02gc: make 'invalid rune in string' a little less crypticRuss Cox1-1/+3
Fixes issue 371. R=ken2 http://codereview.appspot.com/164091
2009-12-02move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.Rob Pike28-64/+83
this breaks the dependency of package io on package bytes. R=rsc CC=golang-dev http://codereview.appspot.com/163085
2009-12-02Runes: turn string into []intPeter Froehlich4-1/+116
Split: fixed typo in documentation R=rsc, r, r1 http://codereview.appspot.com/157170 Committer: Russ Cox <rsc@golang.org>
2009-12-02updated documentation for gofmtRobert Griesemer1-0/+2
R=rsc http://codereview.appspot.com/164085
2009-12-028g: discard tempalloc/tempfree experimentRuss Cox7-141/+61
in favor of tempname. allows optimizer to do more. unfortunately, optimizer seems to be broken; disable it. R=ken2 http://codereview.appspot.com/163091
2009-12-026g etc: groundwork for eliminating redundant bounds checks.Russ Cox7-22/+34
drop check in range over array. drop check in [256]array indexed by byte. R=ken2 http://codereview.appspot.com/163088
2009-12-02Add flag -tabindent to gofmt: forces use ofRobert Griesemer4-154/+191
tabs for indentation even if -spaces is set. Changes to gofmt: - added -tabindent flag - don't recompute parser and printer mode repeatedly Changes to go/printer: - provide new printing mode TabIndent Changes to tabwriter: - implement new mode TabIndent to use tabs independent of the actual padding character for leading empty columns - distinguish between minimal cell width and tab width (tabwidth is only used if the output contains tabs, minwidth and padding are always considered) - fixed and added more comments - some additional factoring By default, -tabindent is disabled and the default gofmt behavior is unchanged. By setting -spaces and -tabindent, gofmt will use tabs for indentation but do any other alignment with spaces. This permits a user to change the visible indentation by simply changing the editor's tab width and the code will remain properly aligned without the need to rerun gofmt. R=rsc http://codereview.appspot.com/163068
2009-12-02net: test and fix support for 0-length datagram packets.Russ Cox2-25/+39
Fixes issue 274. R=r CC=jonathan.r.hudson http://codereview.appspot.com/163072 Committer: Russ Cox <rsc@golang.org>
2009-12-02gofmt: race condition in error reporting and setting exit codeFazlul Shahriar1-1/+4
How to reproduce: $ mkdir /tmp/foo $ cp /dev/null /tmp/foo/bar.go $ chmod -r /tmp/foo/bar.go $ gofmt /tmp/foo open /tmp/foo/bar.go: permission denied $ echo $? # should echo 2 0 $ Maybe you need to put a call to time.Sleep at the beginning of report(). R=gri CC=golang-dev http://codereview.appspot.com/164073 Committer: Robert Griesemer <gri@golang.org>
2009-12-02apply gofmt to json filesRobert Griesemer2-5/+3
R=rsc http://codereview.appspot.com/164071
2009-12-02fix segfault printing errors. add test case and improve messages.Rob Pike2-6/+41
Fixes issue 338. R=rsc CC=golang-dev http://codereview.appspot.com/163083
2009-12-02test that arrays work properly.Rob Pike1-4/+22
can't mix slices and arrays now; perhaps that should be a TODO R=rsc http://codereview.appspot.com/164079
2009-12-02time: another bug in SecondsToUTC.Russ Cox2-0/+26
added random test to look for more. Fixes issue 363. R=r, cw http://codereview.appspot.com/163071
2009-12-02Add Shutdown to 32-bit GNU/Linux build.Ian Lance Taylor1-0/+5
Submitting as a TBR to fix the build. R=dho, rsc http://codereview.appspot.com/164078 Committer: Russ Cox <rsc@golang.org>
2009-12-01time: fix handling of Jan 1 1601, 1201, 801, ...Russ Cox2-6/+7
R=r CC=hurtonm http://codereview.appspot.com/164074
2009-12-01net: fix netFD.Close racesDevon H. O'Dell5-75/+98
Fixes issue 271. Fixes issue 321. R=rsc, agl, cw CC=golang-dev http://codereview.appspot.com/163052 Committer: Russ Cox <rsc@golang.org>
2009-12-01explicitly catch attempt to decode into a value - must be a pointer to see ↵Rob Pike2-2/+20
the result. R=rsc http://codereview.appspot.com/163070
2009-12-01make io.ReadFile use Stat.Size as a hint for preallocationRob Pike1-1/+17
R=rsc CC=golang-dev http://codereview.appspot.com/163069
2009-12-01Add syscall.Shutdown to FreeBSD i386/amd64Devon H. O'Dell5-154/+173
Necessary for 163052 R=rsc CC=golang-dev http://codereview.appspot.com/164068 Committer: Russ Cox <rsc@golang.org>
2009-12-018g: Match sgen definition to declarationEvan Shaw1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/164069 Committer: Russ Cox <rsc@golang.org>
2009-12-01FreeBSD needs #!/usr/bin/env bash (fixes broken build on FreeBSD)Devon H. O'Dell1-1/+1
R=gri http://codereview.appspot.com/163067 Committer: Robert Griesemer <gri@golang.org>
2009-12-01syscall: add Shutdown on OS X, add more constants in mkerror.shRuss Cox8-411/+526
R=dho CC=golang-dev http://codereview.appspot.com/163061
2009-12-01update package unicode to Unicode 5.2Rob Pike4-230/+609
R=rsc CC=golang-dev http://codereview.appspot.com/163062
2009-12-01gob: fix buildRuss Cox1-1/+1
TBR=r http://codereview.appspot.com/163064