Timeline for How to efficiently concatenate strings in go
Current License: CC BY-SA 4.0
40 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 18, 2024 at 17:22 | review | Suggested edits | |||
Nov 24, 2024 at 23:42 | |||||
Oct 26, 2023 at 7:42 | answer | added | Kirill | timeline score: 3 | |
Oct 16, 2021 at 12:41 | answer | added | Sumer | timeline score: 0 | |
Nov 10, 2020 at 12:34 | history | edited | Inanc Gumus | CC BY-SA 4.0 |
added 5 characters in body
|
Mar 5, 2020 at 23:21 | history | edited | Jay | CC BY-SA 4.0 |
edited title
|
Aug 16, 2019 at 6:33 | history | edited | Jonathan Hall | CC BY-SA 4.0 |
edited title
|
S Mar 18, 2019 at 6:51 | history | bounty ended | CommunityBot | ||
S Mar 18, 2019 at 6:51 | history | notice removed | user184968 | ||
S Mar 15, 2019 at 14:23 | history | bounty started | CommunityBot | ||
S Mar 15, 2019 at 14:23 | history | notice added | user184968 | Reward existing answer | |
Sep 18, 2018 at 3:01 | answer | added | Xian Shu | timeline score: 4 | |
Sep 5, 2018 at 16:30 | answer | added | hechen0 | timeline score: -1 | |
Aug 9, 2018 at 9:36 | answer | added | rajni kant | timeline score: 0 | |
S Jul 9, 2018 at 12:21 | history | suggested | jlucktay | CC BY-SA 4.0 |
Fixed grammar for clarity
|
Jul 9, 2018 at 10:22 | review | Suggested edits | |||
S Jul 9, 2018 at 12:21 | |||||
Jan 26, 2018 at 0:52 | answer | added | Krish Bhanushali | timeline score: 1 | |
Dec 13, 2017 at 16:57 | answer | added | Inanc Gumus | timeline score: 632 | |
Nov 16, 2017 at 15:22 | comment | added | Rob |
It doesn't just "seem very inefficient"; it has a specific problem that every new non-CS hire we have ever gotten runs into in the first few weeks on the job. It's quadratic - O(n*n). Think of the number sequence: 1 + 2 + 3 + 4 + ... . It's n*(n+1)/2 , the area of a triangle of base n . You allocate size 1, then size 2, then size 3, etc when you append immutable strings in a loop. This quadratic resource consumption manifests itself in more ways than just this.
|
|
Aug 10, 2017 at 1:29 | comment | added | thomasrutter |
Note: This question and most answers seem to have been written before append() came into the language, which is a good solution for this. It will perform fast like copy() but will grow the slice first even if that means allocating a new backing array if the capacity isn't enough. bytes.Buffer still makes sense if you want its additional convenience methods or if the package you're using expects it.
|
|
Apr 28, 2017 at 8:03 | answer | added | PickBoy | timeline score: 24 | |
Mar 29, 2017 at 8:18 | answer | added | Vitaly Isaev | timeline score: 4 | |
Aug 29, 2016 at 9:39 | history | protected | icza | ||
May 11, 2016 at 0:51 | answer | added | liam | timeline score: -4 | |
Mar 6, 2016 at 20:35 | answer | added | harold ramos | timeline score: 32 | |
Dec 15, 2015 at 5:47 | comment | added | Ivan Black | One more bench | |
May 5, 2015 at 4:55 | history | edited | Salvador Dali | CC BY-SA 3.0 |
deleted 3 characters in body
|
Jan 25, 2015 at 2:40 | answer | added | Peter Buchmann | timeline score: 11 | |
Aug 28, 2014 at 10:46 | answer | added | rog | timeline score: 26 | |
Aug 13, 2014 at 11:34 | history | rollback | icza |
Rollback to Revision 2
|
|
Aug 13, 2014 at 11:32 | history | edited | icza | CC BY-SA 3.0 |
removed semicolons as they are not required in go
|
May 25, 2014 at 17:22 | answer | added | cd1 | timeline score: 295 | |
Sep 4, 2013 at 9:34 | answer | added | user2288856 | timeline score: -5 | |
Jul 2, 2013 at 12:51 | answer | added | Peter Buchmann | timeline score: 14 | |
Apr 29, 2012 at 1:15 | answer | added | JasonMc | timeline score: 48 | |
Mar 19, 2010 at 16:21 | history | edited | hannson |
edited tags
|
|
Nov 20, 2009 at 18:06 | vote | accept | Randy Sugianto 'Yuku' | ||
Nov 19, 2009 at 20:31 | answer | added | marketer | timeline score: 1090 | |
Nov 19, 2009 at 14:18 | answer | added | mbarkhau | timeline score: 155 | |
Nov 19, 2009 at 3:57 | answer | added | user181548 | timeline score: 25 | |
Nov 19, 2009 at 3:44 | history | asked | Randy Sugianto 'Yuku' | CC BY-SA 2.5 |