Added tokenizer benchmark

This commit is contained in:
Eduard Urbach 2024-06-26 18:49:03 +02:00
parent 8464ed3df1
commit 2676ac1ebb
Signed by: eduard
GPG key ID: 49226B848C78F6C8
3 changed files with 57 additions and 1 deletions

View 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)
}
}