]> Cypherpunks repositories - gostls13.git/commit
encoding/csv: optimize Write by giving fieldNeedsQuotes a fast path for when Comma...
authorAlex Gaynor <alex@alloy.us>
Tue, 28 Apr 2020 01:18:29 +0000 (01:18 +0000)
committerIan Lance Taylor <iant@golang.org>
Tue, 5 May 2020 23:57:19 +0000 (23:57 +0000)
commitd75ee813b50e1ff2fec72d501b7b77bc868a3228
tree1177373575a52fa12d22518593e08a2ee7f8796f
parent7db566f9c26236f852fa0f980e6c4e8cf86890f3
encoding/csv: optimize Write by giving fieldNeedsQuotes a fast path for when Comma is ascii

name     old time/op  new time/op  delta
Write-4  2.37µs ±20%  1.90µs ±19%  -19.54%  (p=0.015 n=6+6)

Change-Id: Iadfd9a43c958704c49ceb540b44d145220f9a72f
GitHub-Last-Rev: e7d8b0bd69870a24fdd800401d721e4c5bda7750
GitHub-Pull-Request: golang/go#34507
Reviewed-on: https://go-review.googlesource.com/c/go/+/197078
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/encoding/csv/writer.go
src/encoding/csv/writer_test.go