That's interesting and good to know. I guess it should be expected given 
that Fprint does a bit more work using it's internal printer struct and 
buffer.

On Tuesday, April 23, 2019 at 1:43:55 PM UTC-4, Constantin Konstantinidis 
wrote:
>
> The result is equivalent but a micro-benchmark shows that pkg io is 3x 
> faster.
>
> go version go1.12.2 windows/amd64
> pkg: github.com/iWdGo/GoCompilerEfficiency/src/writestring
> BenchmarkFmtWriteString-4 
> <http://github.com/iWdGo/GoCompilerEfficiency/src/writestringBenchmarkFmtWriteString-4>
>          500000              2002 ns/op
> BenchmarkIoWriteString-4         2000000               635 ns/op
> PASS
>
>
> This is irrelevant is the string requires some build.
> (sorry for the typo above)
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to