Added tokenizer benchmark
This commit is contained in:
parent
8464ed3df1
commit
2676ac1ebb
3 changed files with 57 additions and 1 deletions
15
src/build/token/bench_test.go
Normal file
15
src/build/token/bench_test.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package token_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/cli/q/src/build/token"
|
||||
)
|
||||
|
||||
func BenchmarkTokenize(b *testing.B) {
|
||||
input := []byte("hello := 123\nworld := 456")
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
token.Tokenize(input)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue