1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: add unsafe block for the int->enum cast in bench_compare_tokens.v (#16438)

This commit is contained in:
Basil 2022-11-15 16:34:44 +00:00 committed by GitHub
parent 5dc5766def
commit fe2db64384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ fn main() {
bmark.measure('${max_repetitions} repetitions of token.keywords["${kw}"] = ${res}')
for _ in 0 .. max_repetitions {
res = token.Kind(km_trie.find(kw))
res = unsafe { token.Kind(km_trie.find(kw)) }
}
bmark.measure('${max_repetitions} repetitions of km_trie.find("${kw}") = ${res}')