Commit a3876ac2 authored by Martin Möhrmann's avatar Martin Möhrmann Committed by Rob Pike
Browse files

log: optimize itoa

Reduce buffer to maximally needed size for conversion of 64bit integers.
Reduce number of used integer divisions.

benchmark            old ns/op     new ns/op     delta
BenchmarkItoa        144           119           -17.36%
BenchmarkPrintln     783           752           -3.96%

Change-Id: I6d57a7feebf90f303be5952767107302eccf4631
Reviewed-on: https://go-review.googlesource.com/2215


Reviewed-by: default avatarRob Pike <r@golang.org>
parent 1de9c407
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment