mirror of
https://github.com/fumiama/jieba.git
synced 2026-07-01 09:30:29 +08:00
removed sorts to slightly improve performance
This commit is contained in:
@@ -40,3 +40,10 @@ func TestViterbi(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkViterbi(b *testing.B) {
|
||||
ss := "李小福是创新办主任也是云计算方面的专家;"
|
||||
for i := 0; i < b.N; i++ {
|
||||
viterbi([]rune(ss))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user