An error occurred fetching the project authors.
  1. 26 Feb, 2016 1 commit
  2. 26 Aug, 2015 1 commit
    • Uttam C Pawar's avatar
      bytes: improve Compare function on amd64 for large byte arrays · 32add8d7
      Uttam C Pawar authored
      This patch contains only loop unrolling change for size > 63B
      
      Following are the performance numbers for various sizes on
      On Haswell based system: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz.
      
      benchcmp go.head.8.25.15.txt go.head.8.25.15.opt.txt
      benchmark                       old ns/op     new ns/op     delta
      BenchmarkBytesCompare1-4        5.37          5.37          +0.00%
      BenchmarkBytesCompare2-4        5.37          5.38          +0.19%
      BenchmarkBytesCompare4-4        5.37          5.37          +0.00%
      BenchmarkBytesCompare8-4        4.42          4.38          -0.90%
      BenchmarkBytesCompare16-4       4.27          4.45          +4.22%
      BenchmarkBytesCompare32-4       5.30          5.36          +1.13%
      BenchmarkBytesCompare64-4       6.93          6.78          -2.16%
      BenchmarkBytesCompare128-4      10.3          9.50          -7.77%
      BenchmarkBytesCompare256-4      17.1          13.8          -19.30%
      BenchmarkBytesCompare512-4      31.3          22.1          -29.39%
      BenchmarkBytesCompare1024-4     62.5          39.0          -37.60%
      BenchmarkBytesCompare2048-4     112           73.2          -34.64%
      
      Change-Id: I4eeb1c22732fd62cbac97ba757b0d29f648d4ef1
      Reviewed-on: https://go-review.googlesource.com/11871Reviewed-by: default avatarKeith Randall <khr@golang.org>
      32add8d7
  3. 30 Apr, 2015 1 commit
    • Dmitry Vyukov's avatar
      bytes, strings: add LastIndexByte · 0fb5475b
      Dmitry Vyukov authored
      Currently the packages have the following index functions:
      
      func Index(s, sep []byte) int
      func IndexAny(s []byte, chars string) int
      func IndexByte(s []byte, c byte) int
      func IndexFunc(s []byte, f func(r rune) bool) int
      func IndexRune(s []byte, r rune) int
      
      func LastIndex(s, sep []byte) int
      func LastIndexAny(s []byte, chars string) int
      func LastIndexFunc(s []byte, f func(r rune) bool) int
      
      Searching for the last occurrence of a byte is quite common
      for string parsing algorithms (e.g. find the last paren on a line).
      Also addition of LastIndexByte makes the set more orthogonal.
      
      Change-Id: Ida168849acacf8e78dd70c1354bef9eac5effafe
      Reviewed-on: https://go-review.googlesource.com/9500Reviewed-by: default avatarRob Pike <r@golang.org>
      0fb5475b
  4. 08 Sep, 2014 1 commit
  5. 12 Jun, 2014 1 commit
    • Rui Ueyama's avatar
      bytes, strings: optimize Repeat · 7bcbb65d
      Rui Ueyama authored
      Call copy with as large buffer as possible to reduce the
      number of function calls.
      
      benchmark                 old ns/op    new ns/op    delta
      BenchmarkBytesRepeat            540          162  -70.00%
      BenchmarkStringsRepeat          563          177  -68.56%
      
      LGTM=josharian
      R=golang-codereviews, josharian, dave, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/90550043
      7bcbb65d
  6. 09 May, 2014 1 commit
  7. 19 Mar, 2014 1 commit
  8. 28 Dec, 2013 1 commit
  9. 21 Dec, 2013 1 commit
  10. 11 Sep, 2013 1 commit
  11. 14 May, 2013 1 commit
  12. 02 Apr, 2013 1 commit
    • Keith Randall's avatar
      runtime: Implement faster equals for strings and bytes. · 3d5daa23
      Keith Randall authored
      (amd64)
      benchmark           old ns/op    new ns/op    delta
      BenchmarkEqual0            16            6  -63.15%
      BenchmarkEqual9            22            7  -65.37%
      BenchmarkEqual32           36            9  -74.91%
      BenchmarkEqual4K         2187          120  -94.51%
      
      benchmark            old MB/s     new MB/s  speedup
      BenchmarkEqual9        392.22      1134.38    2.89x
      BenchmarkEqual32       866.72      3457.39    3.99x
      BenchmarkEqual4K      1872.73     33998.87   18.15x
      
      (386)
      benchmark           old ns/op    new ns/op    delta
      BenchmarkEqual0            16            5  -63.85%
      BenchmarkEqual9            22            7  -67.84%
      BenchmarkEqual32           34           12  -64.94%
      BenchmarkEqual4K         2196          113  -94.85%
      
      benchmark            old MB/s     new MB/s  speedup
      BenchmarkEqual9        405.81      1260.18    3.11x
      BenchmarkEqual32       919.55      2631.21    2.86x
      BenchmarkEqual4K      1864.85     36072.54   19.34x
      
      Update #3751
      
      R=bradfitz, r, khr, dave, remyoudompheng, fullung, minux.ma, ality
      CC=golang-dev
      https://golang.org/cl/8056043
      3d5daa23
  13. 08 Feb, 2013 1 commit
  14. 01 Feb, 2013 1 commit
  15. 06 Jan, 2013 1 commit
  16. 30 Oct, 2012 1 commit
  17. 18 Sep, 2012 1 commit
  18. 20 Jul, 2012 1 commit
  19. 18 Feb, 2012 1 commit
  20. 20 Dec, 2011 1 commit
  21. 07 Dec, 2011 1 commit
    • Russ Cox's avatar
      bytes: faster Count, Index, Equal · 9b875bc0
      Russ Cox authored
      Benchmarks are from GOARCH=amd64 on a MacPro5,1.
      
      benchmark                                    old MB/s     new MB/s  speedup
      bytes_test.BenchmarkEqual32                    452.89       891.07    1.97x
      bytes_test.BenchmarkEqual4K                    852.71      1700.44    1.99x
      bytes_test.BenchmarkEqual4M                    841.53      1587.93    1.89x
      bytes_test.BenchmarkEqual64M                   838.22      1578.14    1.88x
      
      bytes_test.BenchmarkIndex32                     58.02        48.99    0.84x
      bytes_test.BenchmarkIndex4K                     48.26        41.32    0.86x
      bytes_test.BenchmarkIndex4M                     48.20        41.24    0.86x
      bytes_test.BenchmarkIndex64M                    48.08        41.21    0.86x
      bytes_test.BenchmarkIndexEasy32                410.04       546.82    1.33x
      bytes_test.BenchmarkIndexEasy4K                849.26     14257.37   16.79x
      bytes_test.BenchmarkIndexEasy4M                854.54     17222.15   20.15x
      bytes_test.BenchmarkIndexEasy64M               843.57     11060.40   13.11x
      
      bytes_test.BenchmarkCount32                     57.24        50.68    0.89x
      bytes_test.BenchmarkCount4K                     48.19        41.82    0.87x
      bytes_test.BenchmarkCount4M                     48.18        41.74    0.87x
      bytes_test.BenchmarkCount64M                    48.17        41.71    0.87x
      bytes_test.BenchmarkCountEasy32                433.11       547.44    1.26x
      bytes_test.BenchmarkCountEasy4K               1130.59     14194.06   12.55x
      bytes_test.BenchmarkCountEasy4M               1131.23     17231.18   15.23x
      bytes_test.BenchmarkCountEasy64M              1111.40     11068.88    9.96x
      
      The non-easy Count/Index benchmarks are a worst case input.
      
      regexp.BenchmarkMatchEasy0_32                  237.46       221.47    0.93x
      regexp.BenchmarkMatchEasy0_1K                  553.53      1019.72    1.84x
      regexp.BenchmarkMatchEasy0_32K                 693.99      1672.06    2.41x
      regexp.BenchmarkMatchEasy0_1M                  688.72      1611.68    2.34x
      regexp.BenchmarkMatchEasy0_32M                 680.70      1565.05    2.30x
      regexp.BenchmarkMatchEasy1_32                  165.56       243.08    1.47x
      regexp.BenchmarkMatchEasy1_1K                  336.45       496.32    1.48x
      regexp.BenchmarkMatchEasy1_32K                 302.80       425.63    1.41x
      regexp.BenchmarkMatchEasy1_1M                  300.42       414.20    1.38x
      regexp.BenchmarkMatchEasy1_32M                 299.64       413.47    1.38x
      
      R=golang-dev, r, iant
      CC=golang-dev
      https://golang.org/cl/5451116
      9b875bc0
  22. 28 Nov, 2011 1 commit
  23. 14 Nov, 2011 1 commit
  24. 08 Nov, 2011 1 commit
  25. 26 Oct, 2011 1 commit
  26. 12 Oct, 2011 1 commit
  27. 26 Sep, 2011 1 commit
  28. 21 Sep, 2011 1 commit
    • Gustavo Niemeyer's avatar
      bytes: fix Replace so it actually copies · d16ceca5
      Gustavo Niemeyer authored
      The documentation for bytes.Replace says it copies
      the slice but it won't necessarily copy them.  Since
      the data is mutable, breaking the contract is an issue.
      
      We either have to fix this by making the copy at all
      times, as suggested in this CL, or we should change the
      documentation and perhaps make better use of the fact
      it's fine to mutate the slice in place otherwise.
      
      R=golang-dev, bradfitz, adg, rsc
      CC=golang-dev
      https://golang.org/cl/5081043
      d16ceca5
  29. 14 Jul, 2011 1 commit
  30. 27 Jun, 2011 1 commit
  31. 25 Mar, 2011 1 commit
  32. 01 Dec, 2010 1 commit
  33. 12 Nov, 2010 1 commit
  34. 09 Nov, 2010 1 commit
    • Evan Shaw's avatar
      bytes: SSE for bytes.IndexByte on amd64 · 49fdfe21
      Evan Shaw authored
      Performance on 2.8 GHz Intel Core i7:
      
      Before:
      BenchmarkIndexByte4K  1000000              2997 ns/op        1366.70 MB/s
      BenchmarkIndexByte4M      500           3049772 ns/op        1375.28 MB/s
      BenchmarkIndexByte64M      50          49582280 ns/op        1353.48 MB/s
      
      After:
      BenchmarkIndexByte4K 10000000               298 ns/op       13744.97 MB/s
      BenchmarkIndexByte4M    10000            285993 ns/op       14665.76 MB/s
      BenchmarkIndexByte64M     500           4618172 ns/op       14531.48 MB/s
      
      R=rsc, PeterGo, r2, r
      CC=golang-dev
      https://golang.org/cl/2888041
      49fdfe21
  35. 27 Oct, 2010 1 commit
  36. 22 Oct, 2010 1 commit
  37. 05 Aug, 2010 1 commit
  38. 04 Aug, 2010 1 commit
  39. 23 Jul, 2010 1 commit
  40. 21 Jul, 2010 1 commit