Skip to content
Go expression evaluation comparison
Branch: master
Clone or download
Latest commit 24ef367 Jun 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add bench May 27, 2019
README.md Add starlark Jun 19, 2019
bexpr_test.go Add starlark Jun 19, 2019
celgo_test.go Add starlark Jun 19, 2019
common.go refactor benchmarks May 27, 2019
expr_test.go Add starlark Jun 19, 2019
go.mod Add starlark Jun 19, 2019
go.sum Add starlark Jun 19, 2019
goja_test.go Add starlark Jun 19, 2019
govaluate_test.go Add starlark Jun 19, 2019
gval_test.go Add starlark Jun 19, 2019
otto_test.go Add starlark Jun 19, 2019
starlark_test.go Add starlark Jun 19, 2019

README.md

Go expression evaluation comparison

I've created an expression evaluation package and wanted to compare it performance against other similar project. So I created this this repository with benchmarks for various packages.

Here is results (lower is better):

Benchmark_expr-8               	10000000	       244 ns/op
Benchmark_celgo-8              	 5000000	       422 ns/op
Benchmark_govaluate-8          	 3000000	       423 ns/op
Benchmark_goja-8               	 3000000	       464 ns/op
Benchmark_bexpr-8              	 2000000	       802 ns/op
Benchmark_otto-8               	 1000000	      1336 ns/op
Benchmark_starlark-8           	  200000	      7885 ns/op
Benchmark_gval-8               	  200000	      9770 ns/op

Usage

You can clone repo and run benchmarks yourself.

go test -bench=. -benchtime=20s
You can’t perform that action at this time.