Giter VIP home page Giter VIP logo

cel-go-benchmarks's Introduction

cel-go-benchmarks

Benchmark github.com/google/cel-go for different payloads and use cases.

Results

testdata_100.ndjson - 100 unique messages

$ make benchmark
go test -run=Bench -bench=. -benchmem
cel-go benchmark
Loaded 100 records
goos: linux
goarch: amd64
pkg: github.com/franchb/cel-go-benchmarks
BenchmarkCelGo/1-4       9491524               123 ns/op              64 B/op          3 allocs/op
BenchmarkCelGo/2-4       9614991               125 ns/op              64 B/op          3 allocs/op
BenchmarkCelGo/4-4       9288651               124 ns/op              64 B/op          3 allocs/op
BenchmarkExpr/1-4        6305431               186 ns/op              96 B/op          5 allocs/op
BenchmarkExpr/2-4        5647844               186 ns/op              96 B/op          5 allocs/op
BenchmarkExpr/4-4        6359542               190 ns/op              96 B/op          5 allocs/op
PASS
ok      github.com/franchb/cel-go-benchmarks    8.791s

10 000 unique messages (need to generate it first):

$ make generate-samples COUNT=10000
$ make benchmark SRC=./testdata/testdata_10000.ndjson
BENCHMARK_DATA=./testdata/testdata_10000.ndjson go test -run=Bench -bench=. -benchmem
cel-go benchmark
Loaded 10000 records
goos: linux
goarch: amd64
pkg: github.com/franchb/cel-go-benchmarks
BenchmarkCelGo/1-4       8410110               140 ns/op              64 B/op          3 allocs/op
BenchmarkCelGo/2-4       8466694               140 ns/op              64 B/op          3 allocs/op
BenchmarkCelGo/4-4       8552630               143 ns/op              64 B/op          3 allocs/op
BenchmarkExpr/1-4        5584927               203 ns/op              96 B/op          5 allocs/op
BenchmarkExpr/2-4        5696047               205 ns/op              96 B/op          5 allocs/op
BenchmarkExpr/4-4        5739594               205 ns/op              96 B/op          5 allocs/op
PASS
ok      github.com/franchb/cel-go-benchmarks    10.665s

When cel-go is used right - it's fast. That's what this benchmark I made for.

cel-go-benchmarks's People

Contributors

franchb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.