When we'd like to concatenates slices in Go, most people usually reach out for append. Most of the time this solution is OK, however if you need to squeeze more performance - copy will be better.
EDIT: As suggested, if you pre-allocate the slice to append it'll fast as well.
If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions
Monday, June 12, 2017
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment