summaryrefslogtreecommitdiff
path: root/src/pkg/big/arith.go
AgeCommit message (Collapse)AuthorFilesLines
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+231
2011-09-13Imported Upstream version 60Ondřej Surý1-248/+0
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-2/+2
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-179/+49
2010-06-21big, bytes: move assembly externs to separate fileRuss Cox1-11/+0
to make it easier to build package without assembly. R=r, r2 CC=golang-dev http://codereview.appspot.com/1680045
2010-05-19big: potential bug fix, cleanupsRobert Griesemer1-0/+2
- implemented setWord, use it where setUint64 is wrong - divLarge: use fast mulWW, divWW; implemented mulWW, divWW - better assembly code for addMulVVW R=rsc CC=golang-dev http://codereview.appspot.com/1258042
2010-05-08big: cleanups and performance tuningRobert Griesemer1-27/+27
- removed last argument (n) from all core arithmetic routines; instead, use the length of the result - simplified nat.make implementation and chose a better capacity for new values, removed a TODO in the process Changing the constant e from 1 (old) to 4 (new) improved pidigits -s -n 10000 by ~9% (on a 3.06GHz Intel Core 2 Duo): user 0m3.882s (old) user 0m3.549s (new) R=rsc CC=golang-dev http://codereview.appspot.com/1133043
2010-05-07big: more cleanupRobert Griesemer1-48/+47
- pass []Word instead of *Word to core arithmetic functions - remove dead code R=rsc CC=golang-dev http://codereview.appspot.com/1154042
2010-05-06big: implemented overlap-tolerant shifts in assemblyRobert Griesemer1-8/+20
- no need to make copies in cases of aliases - removed deprecated internal shift functions - minor unrelated simplifications This change improves pidigits -s -n10000 by almost 20%: user 0m6.156s (old) user 0m4.999s (new) (pidigits -s -n20000 goes from ~25s to ~19s) R=rsc CC=golang-dev http://codereview.appspot.com/1149041
2010-05-01big: cleanup and removal of redundant functionalityRobert Griesemer1-6/+19
R=rsc CC=golang-dev http://codereview.appspot.com/1048041
2010-04-30big: implemented core shift routines in arith.go andRobert Griesemer1-0/+22
provide assembly versions (for x86-64 for now) (Not yet used - waiting for previous CL to clear) R=rsc CC=golang-dev http://codereview.appspot.com/1040041
2010-04-19big: Get rid of function pointers and init functionEvan Shaw1-53/+7
R=rsc, gri CC=golang-dev http://codereview.appspot.com/929041 Committer: Robert Griesemer <gri@golang.org>
2009-12-15 1) Change default gofmt default settings forRobert Griesemer1-125/+125
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 1st set of files. R=rsc CC=agl, golang-dev, iant, ken2, r http://codereview.appspot.com/180047
2009-11-18big: implement 386 assembly routinesRuss Cox1-13/+11
7x speedup on big and crypto/rsa unit tests. also dropped useAsm in favor of making the asm stubs jump to the Go versions. R=agl1 CC=golang-dev, gri http://codereview.appspot.com/157062
2009-11-11Reland a112249da741, this time with missing file.Adam Langley1-4/+5
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-29/+29
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1024040
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-16/+16
R=rsc, r http://go/go-review/1025029
2009-11-06big: fix carry error, add test case.Adam Langley1-3/+0
crypto/x509: reenable tests. R=gri CC=go-dev http://go/go-review/1026004
2009-11-05big: add Div, Mod, Exp, GcdExt and several other fixes.Adam Langley1-10/+48
R=gri, rsc CC=go-dev http://go/go-review/1017036
2009-10-06apply gofmt to the LGTM-marked files from 34501Russ Cox1-31/+31
that have not changed since I applied gofmt. R=gri DELTA=456 (77 added, 3 deleted, 376 changed) OCL=35378 CL=35383
2009-09-09defining package block names must overrideRuss Cox1-1/+1
universe block names. BUG=2097244 R=ken OCL=34295 CL=34473
2009-08-26Implement divWW_g in Go.Ian Lance Taylor1-5/+82
R=gri DELTA=105 (77 added, 23 deleted, 5 changed) OCL=33890 CL=33910
2009-08-26cleanups before making larger changesRobert Griesemer1-2/+1
R=rsc DELTA=113 (10 added, 30 deleted, 73 changed) OCL=33877 CL=33882
2009-08-18- fix performance bug (makeN always allocated a new vector)Robert Griesemer1-0/+12
- removed defs.go (moved declarations into arith.go where they belong) R=r DELTA=40 (16 added, 20 deleted, 4 changed) OCL=33464 CL=33464
2009-08-18fix 386 build:Robert Griesemer1-4/+2
- implememted empty stubs for 386 assembly routines - removed assembly code operating on single words (except for one) - adjusted tests R=rsc DELTA=126 (46 added, 67 deleted, 13 changed) OCL=33461 CL=33461
2009-08-18- implemented MultiplicationRobert Griesemer1-0/+15
- changed Cmp to return -1, 0, +1 - added corresponding test cases R=rsc DELTA=173 (136 added, 3 deleted, 34 changed) OCL=33431 CL=33459
2009-08-15snapshot:Robert Griesemer1-59/+72
- renamed Z -> Int - made Int ops methods on *Int - "install" assembly routines dynamically - replace mulVW functions with mulAddVWW of equivalent performance but symmetric functionality to divWVW - implemented scanN status: - need mulNN (trivial) - need division/modulo after which the set of elementary operations is complete - to/from string conversion working R=rsc DELTA=320 (124 added, 50 deleted, 146 changed) OCL=33308 CL=33341
2009-08-14First cut at a more realistic multi-precision package:Robert Griesemer1-0/+239
- implemented low-level operations on word vectors - implemented corresponding amd64 assembly routines for word vector operations - implemented first set of operations on unsigned integers - implemented first set of operations on signed integers - implemented systematic test cases for each data type R=rsc DELTA=1330 (1330 added, 0 deleted, 0 changed) OCL=33132 CL=33285