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

Feat/improve pin serial #601

Merged
merged 4 commits into from Oct 30, 2018
Merged

Feat/improve pin serial #601

merged 4 commits into from Oct 30, 2018

Conversation

lanzafame
Copy link
Contributor

Merge #597 first.

Benchmarks of PinSerial.ToPin() and PinSerial.DecodeCid():

BenchmarkPinSerial_ToPin-8               2000000              4322 ns/op            1680 B/op         18 allocs/op
BenchmarkPinSerial_DecodeCid-8           5000000              1456 ns/op             576 B/op          6 allocs/op

I don't expect ToPin() to be efficient but we call it quite a lot just to get the decoded Cid value out, especially in the rpc functions (14 occurances of c := pinSerial.ToPin().Cid) which will be a win for rpc calls like Status which gets called a lot.

@lanzafame lanzafame self-assigned this Oct 30, 2018
@ghost ghost added the status/in-progress In progress label Oct 30, 2018
@coveralls
Copy link

coveralls commented Oct 30, 2018

Coverage Status

Coverage decreased (-0.03%) to 64.898% when pulling 4f194f5 on feat/improve-pin-serial into a0dc644 on master.

License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
@hsanjuan hsanjuan merged commit 54fd4fb into master Oct 30, 2018
@hsanjuan hsanjuan deleted the feat/improve-pin-serial branch October 30, 2018 11:41
@ghost ghost removed the status/in-progress In progress label Oct 30, 2018
@hsanjuan hsanjuan mentioned this pull request Oct 30, 2018
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.

None yet

3 participants