ssbc / go-ssb

Go implementation of ssb (work in progress!)
https://scuttlebutt.nz
163 stars 23 forks source link

Further optimizations to VerifyWithBuffer #334

Closed boreq closed 1 year ago

boreq commented 1 year ago

Environment:

goos: linux
goarch: amd64
cpu: AMD Ryzen 7 3700X 8-Core Processor 

Results from master:

BenchmarkVerify-16           633      18817784 ns/op     5285065 B/op      23057 allocs/op

Results from this pull request:

BenchmarkVerify-16           694      16936649 ns/op     2035855 B/op      17710 allocs/op

This pull request further reduces the execution time to 90% of what it is on master and number of allocs to 77% of what it is on master.

boreq commented 1 year ago

It is getting harder to optimize this as at this point 81% of the execution time is something we can do nothing about: signature verification:

2023-03-08 15:33:07

This is the bit that we can still optimize if anyone is curious: 2023-03-08 15:34:43

boreq commented 1 year ago

I will check this.

boreq commented 1 year ago

Oh no that was my broken code. 7e77d30