Skip to content

Commit e1b3726

Browse files
committed
Micro optimisation
1 parent 26282c7 commit e1b3726

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ object Names {
549549
private def hashValue(cs: Array[Char], offset: Int, len: Int): Int = {
550550
var i = offset
551551
var hash = 0
552-
while (i < len + offset) {
552+
val until = offset + len
553+
while (i < until) {
553554
hash = 31 * hash + cs(i)
554555
i += 1
555556
}

0 commit comments

Comments
 (0)