1. 30 Jun, 2014 1 commit
    • Rob Pike's avatar
      encoding/gob: remove unsafe, use reflection. · 3050a0a7
      Rob Pike authored
      This removes a major unsafe thorn in our side, a perennial obstacle
      to clean garbage collection.
      Not coincidentally: In cleaning this up, several bugs were found,
      including code that reached inside by-value interfaces to create
      pointers for pointer-receiver methods. Unsafe code is just as
      advertised.
      
      Performance of course suffers, but not too badly. The Pipe number
      is more indicative, since it's doing I/O that simulates a network
      connection. Plus these are end-to-end, so each end suffers
      only half of this pain.
      
      The edit is pretty much a line-by-line conversion, with a few
      simplifications and a couple of new tests. There may be more
      performance to gain.
      
      BenchmarkEndToEndByteBuffer     2493          3033          +21.66%
      BenchmarkEndToEndPipe           4953          5597          +13.00%
      
      Fixes #5159.
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews, khr
      https://golang.org/cl/102680045
      3050a0a7
  2. 29 Jun, 2014 2 commits
  3. 28 Jun, 2014 6 commits
  4. 27 Jun, 2014 4 commits
  5. 26 Jun, 2014 6 commits
  6. 25 Jun, 2014 4 commits
  7. 24 Jun, 2014 13 commits
  8. 23 Jun, 2014 4 commits
    • Dave Cheney's avatar
      doc/go1.4: add note about Set{uid,gid} change · 88b663b2
      Dave Cheney authored
      LGTM=iant
      R=ruiu, iant
      CC=golang-codereviews
      https://golang.org/cl/107320044
      88b663b2
    • Dave Cheney's avatar
      syscall: disable Setuid/Setgid on linux · 343b4ba8
      Dave Cheney authored
      Update #1435
      
      This proposal disables Setuid and Setgid on all linux platforms.
      
      Issue 1435 has been open for a long time, and it is unlikely to be addressed soon so an argument was made by a commenter
      
      https://code.google.com/p/go/issues/detail?id=1435#c45
      
      That these functions should made to fail rather than succeed in their broken state.
      
      LGTM=ruiu, iant
      R=iant, ruiu
      CC=golang-codereviews
      https://golang.org/cl/106170043
      343b4ba8
    • Mikio Hara's avatar
      syscall: add source-specific multicast socket options for FreeBSD · 7d8da7dc
      Mikio Hara authored
      Update #8266
      
      LGTM=iant
      R=golang-codereviews, iant
      CC=golang-codereviews
      https://golang.org/cl/104290043
      7d8da7dc
    • Rui Ueyama's avatar
      runtime: speed up amd64 memmove · a712e20a
      Rui Ueyama authored
      MOV with SSE registers seems faster than REP MOVSQ if the
      size being copied is less than about 2K. Previously we
      didn't use MOV if the memory region is larger than 256
      byte. This patch improves the performance of 257 ~ 2048
      byte non-overlapping copy by using MOV.
      
      Here is the benchmark result on Intel Xeon 3.5GHz (Nehalem).
      
      benchmark               old ns/op    new ns/op    delta
      BenchmarkMemmove16              4            4   +0.42%
      BenchmarkMemmove32              5            5   -0.20%
      BenchmarkMemmove64              6            6   -0.81%
      BenchmarkMemmove128             7            7   -0.82%
      BenchmarkMemmove256            10           10   +1.92%
      BenchmarkMemmove512            29           16  -44.90%
      BenchmarkMemmove1024           37           25  -31.55%
      BenchmarkMemmove2048           55           44  -19.46%
      BenchmarkMemmove4096           92           91   -0.76%
      
      benchmark                old MB/s     new MB/s  speedup
      BenchmarkMemmove16        3370.61      3356.88    1.00x
      BenchmarkMemmove32        6368.68      6386.99    1.00x
      BenchmarkMemmove64       10367.37     10462.62    1.01x
      BenchmarkMemmove128      17551.16     17713.48    1.01x
      BenchmarkMemmove256      24692.81     24142.99    0.98x
      BenchmarkMemmove512      17428.70     31687.72    1.82x
      BenchmarkMemmove1024     27401.82     40009.45    1.46x
      BenchmarkMemmove2048     36884.86     45766.98    1.24x
      BenchmarkMemmove4096     44295.91     44627.86    1.01x
      
      LGTM=khr
      R=golang-codereviews, gobot, khr
      CC=golang-codereviews
      https://golang.org/cl/90500043
      a712e20a