Repository navigation
Conversation
fmt.Sprintf boxes each value. strconv.FormatInt and FormatUint do the same work directly. The output does not change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getFieldAsStringnow formats integers withstrconv, notfmt.Sprintf. The output does not change.Benchmark_MarshalCSVWithoutHeadersThe 100-row benchmarks are mine and are not in this PR. I used 14 interleaved rounds and benchstat (Apple M5, Go 1.26.5).
One slowdown: a direct call on a nil pointer is 0.3 ns slower (+17%). This path does not run the changed lines, and unrelated padding removes the difference. The cause is probably code layout. Rows of only nil pointers show no significant change.
go test -race ./...passes. Old and new outputs matched on 1,005,328 inputs.I found this change with autor3search.