3 ms·
> Iteratively concatenating strings in Python will murder your performance. Understanding immutable strings aren't at the same level. People concatenate immuta
by irahul 14y ago
> Iteratively concatenating strings in Python will murder your performance.
Understanding immutable strings aren't at the same level. People concatenate immutable strings all the time in Java/Python, but that is despite the documentation mentioning immutability and proper concatenation method(StringBuffer followed by toString, list.append() followed by " ".join(list))
- monkeyfacebag 14y ago> despite the documentation mentioning immutability and proper concatenation method What-do-you-know, Scala has documentation too[1]! And it mentions that appending to a List is O(n). [1] http://www.scala-lang.org/api/current/scala/collection/immutable/List.html http://www.scala-lang.org/api/current/scala/collection/immut...