Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline the large-weight heap to avoid interface conversions #11

Merged
merged 3 commits into from
Nov 16, 2019

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Nov 15, 2019

Before:

BenchmarkAdd_Norm_100-8       	33945012	        35.3 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Norm_10000-8     	29864768	        35.3 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Norm_1000000-8   	 8718654	       209 ns/op	      48 B/op	       0 allocs/op
BenchmarkAdd_Exp_100-8        	34625696	        31.3 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Exp_10000-8      	39429486	        30.0 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Exp_1000000-8    	 9097611	       199 ns/op	      50 B/op	       0 allocs/op

After:

BenchmarkAdd_Norm_100-8       	37324060	        32.3 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Norm_10000-8     	41255592	        32.7 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Norm_1000000-8   	12280093	        98.6 ns/op	      30 B/op	       0 allocs/op
BenchmarkAdd_Exp_100-8        	36671206	        28.6 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Exp_10000-8      	41433784	        29.3 ns/op	       8 B/op	       0 allocs/op
BenchmarkAdd_Exp_1000000-8    	12819754	       107 ns/op	      29 B/op	       0 allocs/op

@jmacd jmacd merged commit 879f6b8 into master Nov 16, 2019
@jmacd jmacd deleted the jmacd/inline_heap branch November 16, 2019 06:04
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.

1 participant