18 lines
305 B
Go
Raw Normal View History

2024-06-26 13:24:10 +00:00
package expression_test
import (
"testing"
"git.akyoto.dev/cli/q/src/build/expression"
"git.akyoto.dev/cli/q/src/build/token"
)
func BenchmarkExpression(b *testing.B) {
src := []byte("(1+2-3*4)+(5*6-7+8)")
tokens := token.Tokenize(src)
for i := 0; i < b.N; i++ {
2024-06-30 20:54:59 +00:00
expression.Parse(tokens)
2024-06-26 13:24:10 +00:00
}
}