1. 09 Aug, 2013 9 commits
    • Pieter Droogendijk's avatar
      encoding/csv: always allow trailing commas · f2bc2755
      Pieter Droogendijk authored
      Original CL by rsc (11916045):
      
      The motivation for disallowing them was RFC 4180 saying
      "The last field in the record must not be followed by a comma."
      I believe this is an admonition to CSV generators, not readers.
      When reading, anything followed by a comma is not the last field.
      
      Fixes #5892.
      
      R=golang-dev, rsc, r
      CC=golang-dev
      https://golang.org/cl/12294043
      f2bc2755
    • Rémy Oudompheng's avatar
      cmd/5c, cmd/5g, cmd/5l: turn MOVB, MOVH into plain moves, optimize short arithmetic. · 357f7336
      Rémy Oudompheng authored
      Pseudo-instructions MOVBS and MOVHS are used to clarify
      the semantics of short integers vs. registers:
       * 8-bit and 16-bit values in registers are assumed to always
         be zero-extended or sign-extended depending on their type.
       * MOVB is truncation or move of an already extended value
         between registers.
       * MOVBU enforces zero-extension at the destination (register).
       * MOVBS enforces sign-extension at the destination (register).
      And similarly for MOVH/MOVS/MOVHU.
      
      The linker is adapted to assemble MOVB and MOVH to an ordinary
      mov. Also a peephole pass in 5g that aims at eliminating
      redundant zero/sign extensions is improved.
      
      encoding/binary:
      benchmark                              old ns/op    new ns/op    delta
      BenchmarkReadSlice1000Int32s              220387       217185   -1.45%
      BenchmarkReadStruct                        12839        12910   +0.55%
      BenchmarkReadInts                           5692         5534   -2.78%
      BenchmarkWriteInts                          6137         6016   -1.97%
      BenchmarkPutUvarint32                        257          241   -6.23%
      BenchmarkPutUvarint64                        812          754   -7.14%
      benchmark                               old MB/s     new MB/s  speedup
      BenchmarkReadSlice1000Int32s               18.15        18.42    1.01x
      BenchmarkReadStruct                         5.45         5.42    0.99x
      BenchmarkReadInts                           5.27         5.42    1.03x
      BenchmarkWriteInts                          4.89         4.99    1.02x
      BenchmarkPutUvarint32                      15.56        16.57    1.06x
      BenchmarkPutUvarint64                       9.85        10.60    1.08x
      
      crypto/des:
      benchmark                              old ns/op    new ns/op    delta
      BenchmarkEncrypt                            7002         5169  -26.18%
      BenchmarkDecrypt                            7015         5195  -25.94%
      benchmark                               old MB/s     new MB/s  speedup
      BenchmarkEncrypt                            1.14         1.55    1.36x
      BenchmarkDecrypt                            1.14         1.54    1.35x
      
      strconv:
      benchmark                              old ns/op    new ns/op    delta
      BenchmarkAtof64Decimal                       457          385  -15.75%
      BenchmarkAtof64Float                         574          479  -16.55%
      BenchmarkAtof64FloatExp                     1035          906  -12.46%
      BenchmarkAtof64Big                          1793         1457  -18.74%
      BenchmarkAtof64RandomBits                   2267         2066   -8.87%
      BenchmarkAtof64RandomFloats                 1416         1194  -15.68%
      BenchmarkAtof32Decimal                       451          379  -15.96%
      BenchmarkAtof32Float                         547          435  -20.48%
      BenchmarkAtof32FloatExp                     1095          986   -9.95%
      BenchmarkAtof32Random                       1154         1006  -12.82%
      BenchmarkAtoi                               1415         1380   -2.47%
      BenchmarkAtoiNeg                            1414         1401   -0.92%
      BenchmarkAtoi64                             1744         1671   -4.19%
      BenchmarkAtoi64Neg                          1737         1662   -4.32%
      
      Fixes #1837.
      
      R=rsc, dave, bradfitz
      CC=golang-dev
      https://golang.org/cl/12424043
      357f7336
    • Russ Cox's avatar
      cmd/go: install godoc into correct directory · 51e9858a
      Russ Cox authored
      Fixes #6043.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/12693043
      51e9858a
    • Shivakumar GN's avatar
      misc/pprof: pprof on windows does not provide demangled names · 88d544e0
      Shivakumar GN authored
      Fixes #6034.
      
      R=golang-dev, bradfitz, alex.brainman, dan.kortschak
      CC=golang-dev
      https://golang.org/cl/12311044
      88d544e0
    • Rob Pike's avatar
      text/template/parse: nicer error when comment ends before final delimiter · b7eb0e59
      Rob Pike authored
      By separating finding the end of the comment from the end of the action,
      we can diagnose malformed comments better.
      Also tweak the documentation to make the comment syntax clearer.
      
      Fixes #6022.
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/12570044
      b7eb0e59
    • Russ Cox's avatar
      cmd/cc: restore correct meaning of %Q · 237e7c13
      Russ Cox authored
      g% 6c ~/x.c
      /Users/rsc/x.c:1 duplicate types given: STRUCT s and VOID
      /Users/rsc/x.c:1 no return at end of function: f
      g%
      
      Fixes #6083.
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/12691043
      237e7c13
    • Rob Pike's avatar
      reflect: avoid allocation when interface's contents are not addressable · 94179d61
      Rob Pike authored
      See issue 4949 for a full explanation.
      
      Allocs go from 1 to zero in the non-addressable case.
      Fixes #4949.
      
      BenchmarkInterfaceBig             90           14  -84.01%
      BenchmarkInterfaceSmall           14           14   +0.00%
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12646043
      94179d61
    • David Symonds's avatar
      net/mail: comment our divergence from RFC 5322. · d2bff757
      David Symonds authored
      R=golang-dev, bradfitz
      CC=golang-dev, ryanslade
      https://golang.org/cl/12588044
      d2bff757
    • Mikio Hara's avatar
      net: separate unix pollster initialization from network file descriptor allocation · 554d47ec
      Mikio Hara authored
      Unlike the existing net package own pollster, runtime-integrated
      network pollster on BSD variants, actually kqueue, requires a socket
      that has beed passed to syscall.Listen previously for a stream
      listener.
      
      This CL separates pollDesc.Init of Unix network pollster from newFD
      to avoid any breakages in the transition from Unix network pollster
      to runtime-integrated pollster. Upcoming CLs will rearrange the call
      order of pollster and syscall functions like the following;
      
      - For dialers that open active connections, pollDesc.Init will be
        called in between syscall.Bind and syscall.Connect.
      
      - For stream listeners that open passive stream connections,
        pollDesc.Init will be called just after syscall.Listen.
      
      - For datagram listeners that open datagram connections,
        pollDesc.Init will be called just after syscall.Bind.
      
      This is in preparation for runtime-integrated network pollster for BSD
      variants.
      
      Update #5199
      
      R=dvyukov, bradfitz
      CC=golang-dev
      https://golang.org/cl/12663043
      554d47ec
  2. 08 Aug, 2013 26 commits
  3. 07 Aug, 2013 5 commits