1
0
mirror of https://github.com/golang/go synced 2024-10-01 08:18:32 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
David Symonds
24257c8cd2 tools: add import comments.
Change-Id: Idda6e64580432cb9a731e4ebf4005ee4ceb4202d
Reviewed-on: https://go-review.googlesource.com/1244
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 22:42:16 +00:00
Alan Donovan
b8d26f5b94 tools: minor comment fixes.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/173170043
2014-11-13 12:34:25 -05:00
Alan Donovan
5fe8afcb15 container/intsets: add benchmark of AppendTo method.
Also:
- increase sparsity of sets in benchmarks.
- removed TODO in forEach.  Subword masks had no benefit.
- minor cleanup.

LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/103470049
2014-06-19 14:35:37 -04:00
Alan Donovan
fd72015344 go.tools/container/intsets: increase block size to 256 bits.
This consistently yields better performance with go/pointer.

Also: return int not word from ntz().

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/97570044
2014-05-30 13:21:36 -04:00
Alan Donovan
65906ce503 go.tools/container/intsets: support negative elements in BitString().
(I forgot about this when we added support for negative elements generally.)

We use floating point for negative numbers.  The order of the
output is reversed from the previous (little-endian) behaviour
since it makes for more readable floating point.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/95570043
2014-05-20 14:52:50 -04:00
Alan Donovan
174d6e8ca3 go.tools/container/intsets: use " " not ", " as (*Sparse).String() separator.
This is both easier to read and 25% shorter (helpful when
using String() as a map key for interning sets).

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/96370045
2014-05-16 13:06:08 -04:00
Alan Donovan
e1b97610f0 go.tools/container/intsets: fix compile error on 32-bit platforms.
Also, fix typo.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/99310043
2014-05-15 14:03:05 -04:00
Alan Donovan
61c5c64029 go.tools/container/intsets: Sparse: a space-efficient representation for ordered sets of int values.
intsets.Sparse is a sparse bit vector.  It uses space proportional
to the number of elements, not the maximum element (as is the case		for a dense bit vector).

A forthcoming CL will make use of it in go/pointer, where it reduces
solve time by 78%.  A similar representation is used for Andersen's
analysis in gcc and LLVM.

+ Tests.

LGTM=sameer, crawshaw, gri
R=gri
CC=crawshaw, golang-codereviews, sameer
https://golang.org/cl/10837043
2014-05-14 17:54:14 -04:00