Benchmarks of expression evaluation libraries for Golang.
go test -bench=. -benchmem -count 5 -benchtime=100000x > results/results.out
All the benchmarks are performed in the Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
machine with 10K
samples and 5
iterations.
Average Compile time for each expression library
Average Evaluation time for each expression library
- antonmedv/expr - Expression language and expression evaluation for Go
- d5/tengo - A fast script language for Go.
- dop251/goja - ECMAScript/JavaScript engine in pure Go.
- google/cel-go - Fast, portable, non-Turing complete expression evaluation with gradual typing (Go)
- hashicorp/go-bexpr - Generic boolean expression evaluation in Go.
- Knetic/govaluate - Arbitrary expression evaluation for golang.
- PaesslerAG/gval - Expression evaluation in golang.
- robertkrimen/otto - A JavaScript interpreter in Go (golang).
- skx/evalfilter - A byte-code based virtual machine to implement scripting/filtering support in your golang project.
- google/starlark-go - Starlark in Go: The Starlark configuration language, implemented in Go.
- Test data is generated using mockaroo