awalterschulze / gominikanren

a Go implementation of miniKanren, an embedded Domain Specific Language for logic programming.
Other
38 stars 2 forks source link

fibonacci benchmarks #17

Closed deosjr closed 4 years ago

deosjr commented 4 years ago

Previous gains in concurrent fibonacci seem to have disappeared. I was seeing a lot of weird result; things made more sense when I ran benchmark with p=1. Cleaned up a race in benchmarks by passing the disj/conj funcs now.

Benchmarks currently:

go test ./... -bench=.
BenchmarkMembero10000-12                       6     170382961 ns/op
BenchmarkConcMembero10000-12                   6     175794696 ns/op
BenchmarkMembero50000-12                       1    4712985422 ns/op
BenchmarkConcMembero50000-12                   1    4664648870 ns/op
BenchmarkMapo10000-12                          1    2614844021 ns/op
BenchmarkConcMapo10000-12                      1    2573593390 ns/op
BenchmarkMapoFailHead10000-12                  1    2587187449 ns/op
BenchmarkConcMapoFailHead10000-12              1    3039544651 ns/op
BenchmarkMapoFailTail10000-12                  1    2584415515 ns/op
BenchmarkConcMapoFailTail10000-12              1    3051092403 ns/op
BenchmarkEinsteinSeqZzz-12                     2     762453454 ns/op
BenchmarkEinsteinSeq-12                        3     480798089 ns/op
BenchmarkEinsteinConcZzz-12                    2     848067872 ns/op
BenchmarkEinsteinConc-12                       3     425367135 ns/op
BenchmarkEinsteinConcNoOrder-12                3     415359342 ns/op
BenchmarkFib10SeqZzz-12                       57      23192539 ns/op
BenchmarkFib10Seq-12                          64      21799538 ns/op
BenchmarkFib10ConcZzz-12                      57      23752112 ns/op
BenchmarkFib10Conc-12                         51      29625355 ns/op
BenchmarkFib15SeqZzz-12                        1    4007512714 ns/op
BenchmarkFib15Seq-12                           1    3582889230 ns/op
BenchmarkFib15ConcZzz-12                       1    3717924170 ns/op
BenchmarkFib15Conc-12                          1    6402106900 ns/op