Skip to content

Conversation

@okhowang
Copy link
Collaborator

@okhowang okhowang commented Nov 19, 2024

fix #12

before:
BenchmarkGenSig
BenchmarkGenSig-16                          7788            150884 ns/op          817750 B/op         62 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16               7298            140476 ns/op          818145 B/op         68 allocs/op

after:
BenchmarkGenSig
BenchmarkGenSig-16               	   39601	     30510 ns/op	    3896 B/op	      42 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16    	   38188	     31464 ns/op	    4064 B/op	      48 allocs/op
before:
BenchmarkGenSig
BenchmarkGenSig-16               	   39601	     30510 ns/op	    3896 B/op	      42 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16    	   38188	     31464 ns/op	    4064 B/op	      48 allocs/op

after:
BenchmarkGenSig
BenchmarkGenSig-16               	  191563	      6149 ns/op	    4400 B/op	      41 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16    	  180298	      6598 ns/op	    4357 B/op	      45 allocs/op
before:
BenchmarkGenSig
BenchmarkGenSig-16               	  191563	      6149 ns/op	    4400 B/op	      41 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16    	  180298	      6598 ns/op	    4357 B/op	      45 allocs/op

after:
BenchmarkGenSig
BenchmarkGenSig-16               	  394201	      3111 ns/op	    2131 B/op	      19 allocs/op
BenchmarkGenUserSigWithBuf
BenchmarkGenUserSigWithBuf-16    	  372675	      3170 ns/op	    1866 B/op	      22 allocs/op
@weijunyi weijunyi merged commit 0df3178 into master Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

genSig使用zlib压缩,严重影响性能

3 participants