The value of cosines are cached in a global array
instead of being recomputed each time.
The test was terribly slow on arm.
R=golang-dev, dave, nigeltao
CC=golang-dev
https://golang.org/cl/6733046
Since this patch changes the way complex literals are written
in export data, there are a few other glitches.
Fixes#4159.
R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/6674047
At the moment, gc and gccgo report compile-
time errors for certain constant indexes that
are out of bounds. The spec however requests
a run-time panic for out-of-bounds indexes
(http://tip.golang.org/ref/spec#Indexes).
Document the status quo.
Fixes#4231.
R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6699048
A 4-bit window is convenient because 4 divides both 32 and 64,
therefore we never have a window spanning words of the exponent.
Additionaly, the benefit of a 5-bit window is only 2.6% at 1024-bits
and 3.3% at 2048-bits.
This code is still not constant time, however.
benchmark old ns/op new ns/op delta
BenchmarkRSA2048Decrypt 17108590 11180370 -34.65%
Benchmark3PrimeRSA2048Decrypt 13003720 7680390 -40.94%
R=gri
CC=golang-dev
https://golang.org/cl/6716048
Define the properties of the arguments better. In particular,
explain that the path is (sort of) relative to the argument to
Walk.
Fixes#4119.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6721048
- always return 1 for y <= 0
- document that the sign of m is ignored
- protect against div-0 panics by treating
m == 0 the same way as m == nil
- added extra tests
Fixes#4239.
R=agl, remyoudompheng, agl
CC=golang-dev
https://golang.org/cl/6724046
The RFC doesn't actually have an opinion on whether this is a fatal or
warning level alert, but common practice suggests that it should be a
warning.
This involves rebasing most of the tests.
Fixes#3413.
R=golang-dev, shanemhansen, rsc
CC=golang-dev
https://golang.org/cl/6654050
This patch is enough to fix compilation of
exp/types tests but only passes a stripped down
version of the appripriate torture test.
Update #4207.
R=dave, nigeltao, rsc, golang-dev
CC=golang-dev
https://golang.org/cl/6621061
Proposed new text to make matters clearer. The existing text was
unclear about the state of result parameters when panicking.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6653047
To be clear, this supports decoding the bytes on the wire into an
in-memory image. There is no API change: jpeg.Decode will still not
return until the entire image is decoded.
The code is obviously more complicated, and costs around 10% in
performance on baseline JPEGs. The processSOS code could be cleaned up a
bit, and maybe some of that loss can be reclaimed, but I'll leave that
for follow-up CLs, to keep the diff for this one as small as possible.
Before:
BenchmarkDecode 1000 2855637 ns/op 21.64 MB/s
After:
BenchmarkDecodeBaseline 500 3178960 ns/op 19.44 MB/s
BenchmarkDecodeProgressive 500 4082640 ns/op 15.14 MB/s
Fixes#3976.
The test data was generated by:
# Create intermediate files; cjpeg on Ubuntu 10.04 can't read PNG.
convert video-001.png video-001.bmp
convert video-005.gray.png video-005.gray.pgm
# Create new test files.
cjpeg -quality 100 -sample 1x1,1x1,1x1 -progressive video-001.bmp > video-001.progressive.jpeg
cjpeg -quality 50 -sample 2x2,1x1,1x1 video-001.bmp > video-001.q50.420.jpeg
cjpeg -quality 50 -sample 2x1,1x1,1x1 video-001.bmp > video-001.q50.422.jpeg
cjpeg -quality 50 -sample 1x1,1x1,1x1 video-001.bmp > video-001.q50.444.jpeg
cjpeg -quality 50 -sample 2x2,1x1,1x1 -progressive video-001.bmp > video-001.q50.420.progressive.jpeg
cjpeg -quality 50 -sample 2x1,1x1,1x1 -progressive video-001.bmp > video-001.q50.422.progressive.jpeg
cjpeg -quality 50 -sample 1x1,1x1,1x1 -progressive video-001.bmp > video-001.q50.444.progressive.jpeg
cjpeg -quality 50 video-005.gray.pgm > video-005.gray.q50.jpeg
cjpeg -quality 50 -progressive video-005.gray.pgm > video-005.gray.q50.progressive.jpeg
# Delete intermediate files.
rm video-001.bmp video-005.gray.pgm
R=r
CC=golang-dev
https://golang.org/cl/6684046
caller of ioutil.TempFile() can use f.Name() to get "pathname"
of the temporary file, instead of just the "name" of the file.
Also remove an out-of-date comment about random number state.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6649054
Valgrind Massif result when linking godoc:
On amd64:
old new -/+
mem_heap_B 185844612 175358047 -5.7%
mem_heap_extra_B 773404 773137 -0.0%
On 386/ARM:
old new -/+
mem_heap_B 141775701 131289941 -7.4%
mem_heap_extra_B 737011 736955 -0.0%
R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/6655045
Better explanation of width for floating-point values.
Explain that scanning does not handle %#q etc.
Fixes#4202.
Fixes#4206.
R=golang-dev, adg, rsc, iant
CC=golang-dev
https://golang.org/cl/6620074
I was an idiot and was thinking that a small base didn't matter
because the exponentiation would quickly make the number the same size
as the modulus. But, of course, the small base continues to make
multiplications unrealistically cheap throughout the computation.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6649048
It was suggested that it's too easy to use crypto/hmac insecurely and
I think that has some merit. This change adds a Equal function to
make it obvious that MAC values should be compared in constant time.
R=rsc, max
CC=golang-dev
https://golang.org/cl/6632044
0. windows uses all.bat instead of ./all.bash
1. correct expected all.bash output
2. mention you need to use an application specific password
if you're using 2-step verification
3. note you can edit files included in CL by 'hg change NNNN'
or 'hg file'
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/6615060