1. 07 Sep, 2017 5 commits
  2. 06 Sep, 2017 13 commits
  3. 05 Sep, 2017 7 commits
  4. 04 Sep, 2017 1 commit
  5. 03 Sep, 2017 4 commits
  6. 02 Sep, 2017 2 commits
    • Mark Pulford's avatar
      math: Add Round function (ties away from zero) · 03c3bb5f
      Mark Pulford authored
      This function avoids subtle faults found in many ad-hoc implementations,
      and is simple enough to be inlined by the compiler.
      
      Fixes #20100
      
      Change-Id: Ib320254e9b1f1f798c6ef906b116f63bc29e8d08
      Reviewed-on: https://go-review.googlesource.com/43652Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      03c3bb5f
    • Keith Randall's avatar
      runtime: fix hashmap load factor computation · dbe3522c
      Keith Randall authored
      overLoadFactor wasn't really doing what it says it does.
      It was reporting overOrEqualToLoadFactor.  That's actually what we
      want when adding an entry to a map, but it isn't what we want when
      constructing a map in the first place.
      
      The impetus for this change is that if you make a map with a hint
      of exactly 8 (which happens, for example, with the unitMap in
      time/format.go), we allocate 2 buckets for it instead of 1.
      
      Instead, make overLoadFactor really report when it is > the max
      allowed load factor, not >=.  Adjust the callers who want to ensure
      that the map is no more than the max load factor after an insertion
      by adding a +1 to the current (pre-addition) size.
      
      Change-Id: Ie8d85344800a9a870036b637b1031ddd9e4b93f9
      Reviewed-on: https://go-review.googlesource.com/61053
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMartin Möhrmann <moehrmann@google.com>
      dbe3522c
  7. 01 Sep, 2017 8 commits