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

Optimise processTopology() #3074

Merged
merged 3 commits into from
Feb 19, 2018
Merged

Optimise processTopology() #3074

merged 3 commits into from
Feb 19, 2018

Conversation

bboreham
Copy link
Collaborator

From a memory profile, 11% of all space is allocated in process.reporter.processTopology(); this PR creates a benchmark and reduces allocations by half through calling different APIs.

Also optimised the merge-to-empty case in a few sub-structures that should help a little elsewhere.

before:

BenchmarkReporter-2   	   10000	    105043 ns/op	   32205 B/op	     227 allocs/op

after:

BenchmarkReporter-2   	   50000	     34800 ns/op	   15818 B/op	     161 allocs/op

@bboreham bboreham merged commit b742846 into master Feb 19, 2018
@bboreham bboreham deleted the optimise-process-topology branch February 19, 2018 10:14
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.

2 participants