Skip to content

Commit beffbee

Browse files
committed
Use StringBuilder instead of StringBuffer (thanks @smarter)
StringBuffer is synchronized thus is slower.
1 parent 75e0b8d commit beffbee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/NameOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ object NameOps {
298298
* `<return type><first type><second type><...>`
299299
*/
300300
def specializedFunction(ret: Type, args: List[Type])(using Context): Name =
301-
val sb = new StringBuffer
301+
val sb = new StringBuilder
302302
sb.append(name.toString)
303303
sb.append(nme.specializedTypeNames.prefix.toString)
304304
sb.append(nme.specializedTypeNames.separator)

0 commit comments

Comments
 (0)