joined() seems to be much more efficient than reduce()

This commit is contained in:
Devin Pitcher 2020-02-09 11:22:01 -07:00
parent 7f187fd880
commit caa81e830c
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ open class StringBuilder {
:return: String
*/
open func toString() -> String {
return buffer.reduce("", +)
return buffer.joined()
}
/**