Skip to content

mwuertinger/golang-string-concatenation-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Go string concatenation benchmark

Micro benchmark showing the performance of Sprint() vs. Sprintf() style string concatenation.

Build and run

go test -bench .

Results

The results show that Sprintf() is actually faster:

BenchmarkSprintf-4      16268862                73.7 ns/op
BenchmarkSprint-4       12674227                94.7 ns/op

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages