1. 06 Mar, 2016 2 commits
    • Dave Cheney's avatar
      cmd/compile/internal/gc: assert size of important types · 8f5fb95d
      Dave Cheney authored
      Add tests to ensure that the size of important types don't change
      unexpectedly.
      
      Skip the test on nacl platforms because of their unusual padding
      requirements.
      
      Change-Id: Iddb127a99499e089a309b721f5073356c0da8b24
      Reviewed-on: https://go-review.googlesource.com/20285Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Dave Cheney <dave@cheney.net>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8f5fb95d
    • Martin Möhrmann's avatar
      fmt: refactor and unify float and complex formatting · bd6d8428
      Martin Möhrmann authored
      Removes specialized functions for each verb and float/complex size
      and replaces them with generic variants fmtFloat and
      fmtComplex similar to other generic fmt functions.
      
      Simplifies the complex formatting by relying on fmtFloat
      to handle the verb and default precision selection.
      
      Complex imaginary formatting does not need to clear the f.space flag
      because the set f.plus flag will force a sign instead of a space.
      
      Sets default precision for %b to -1 (same as %g and %G)
      since precision for %b has no affect in strconv.AppendFloat.
      
      Add more tests and group them a bit better.
      Use local copies of +Inf,-Inf and NaN instead
      of math package functions for testing.
      
      Saves around 8kb in the go binary.
      
      name              old time/op  new time/op  delta
      SprintfFloat-2     200ns ± 4%   196ns ± 4%  -1.55%  (p=0.007 n=20+20)
      SprintfComplex-2   569ns ± 4%   570ns ± 3%    ~     (p=0.804 n=20+20)
      
      Change-Id: I36d35dab6f835fc2bd2c042ac97705868eb2446f
      Reviewed-on: https://go-review.googlesource.com/20252Reviewed-by: default avatarRob Pike <r@golang.org>
      Run-TryBot: Rob Pike <r@golang.org>
      bd6d8428
  2. 05 Mar, 2016 11 commits
  3. 04 Mar, 2016 27 commits