1. 10 Dec, 2009 10 commits
  2. 09 Dec, 2009 18 commits
  3. 08 Dec, 2009 2 commits
  4. 07 Dec, 2009 7 commits
  5. 06 Dec, 2009 3 commits
    • Rob Pike's avatar
      save a few ns by inlining (which mostly simplifies things anyway). · f91cd447
      Rob Pike authored
      a couple of cleanups.
      don't keep big buffers in the free list.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/166078
      f91cd447
    • Rob Pike's avatar
      unexport Fmt. it's not needed outside this package any more · 353ef80f
      Rob Pike authored
      cleans up godoc's output for package fmt substantially.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/165070
      353ef80f
    • Rob Pike's avatar
      Make printing faster by avoiding mallocs and some other advances. · 4c0e51cd
      Rob Pike authored
      Roughly 33% faster for simple cases, probably more for complex ones.
      
      Before:
      
      mallocs per Sprintf(""): 4
      mallocs per Sprintf("xxx"): 6
      mallocs per Sprintf("%x"): 10
      mallocs per Sprintf("%x %x"): 12
      
      Now:
      
      mallocs per Sprintf(""): 2
      mallocs per Sprintf("xxx"): 3
      mallocs per Sprintf("%x"): 5
      mallocs per Sprintf("%x %x"): 7
      
      Speed improves because of avoiding mallocs and also by sharing a bytes.Buffer
      between print.go and format.go rather than copying the data back after each
      printed item.
      
      Before:
      
      fmt_test.BenchmarkSprintfEmpty	1000000	      1346 ns/op
      fmt_test.BenchmarkSprintfString	500000	      3461 ns/op
      fmt_test.BenchmarkSprintfInt	500000	      3671 ns/op
      
      Now:
      
      fmt_test.BenchmarkSprintfEmpty	 2000000	       995 ns/op
      fmt_test.BenchmarkSprintfString	 1000000	      2745 ns/op
      fmt_test.BenchmarkSprintfInt	 1000000	      2391 ns/op
      fmt_test.BenchmarkSprintfIntInt	  500000	      3751 ns/op
      
      I believe there is more to get but this is a good milestone.
      
      R=rsc
      CC=golang-dev, hong
      https://golang.org/cl/166076
      4c0e51cd