FAQ

On Saturday, October 13, 2012 1:29:00 AM UTC-5, Evan Shaw wrote:
My biggest piece of advice would be: don't concatenate strings to
build strings. Using []byte and append or bytes.Buffer will give you
much better performance than you're getting now.
Thanks.

Your use of closures seems a little strange to me too, but I think
getting rid of the string concatenations will help more than anything
else.
The idea of the whole code is to iterate over the records of a file. So I
decided
to code an iterator and for that I use a closure. For my first attempt I
used
channels, but the performance was worse. I will also rewrite the channel
version
so I use slices instead of strings to see how the performance increases.

Could you please tell me more about why you think my closure usage is
weird? What other approach would you follow?

Thanks for the feedback!
-drd

--

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 10 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 13, '12 at 5:02a
activeOct 13, '12 at 10:47p
posts10
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase