Skip to content

Optimize multiple ECPoint encoding#1939

Merged
shargon merged 11 commits intoneo-project:masterfrom
shargon:optimize-ecpoint-encode
Sep 18, 2020
Merged

Optimize multiple ECPoint encoding#1939
shargon merged 11 commits intoneo-project:masterfrom
shargon:optimize-ecpoint-encode

Conversation

@shargon
Copy link
Copy Markdown
Member

@shargon shargon commented Sep 16, 2020

Related to #1321

  • It will speed up KeyPair (Sign/Verify) and ConsensusService

@shargon shargon requested a review from erikzhang September 16, 2020 16:45
Copy link
Copy Markdown
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Shargon. I agree it may be good to cache this converstion.

}

public byte[] EncodePoint(bool commpressed)
public byte[] EncodePoint(bool commpressed, bool allowCache = true)
Copy link
Copy Markdown
Member

@vncoelho vncoelho Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of allowCache? Is there any benefit in some uses?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to avoid the modification of this array inside the VM, but I changed the logic

@shargon shargon merged commit 5d51195 into neo-project:master Sep 18, 2020
@shargon shargon deleted the optimize-ecpoint-encode branch September 18, 2020 09:00
ShawnYun pushed a commit to ShawnYun/neo that referenced this pull request Jan 8, 2021
* Optimize multiple encodes

* Fix hashcode

* Revert "Fix hashcode"

This reverts commit 5866669.

* Test cache

* Fix UT

* Fix Smart contract cache

* Fix set without cache

* Improve

* Remove allowCache

* fix english

* Remove change
cloud8little pushed a commit to cloud8little/neo that referenced this pull request Jan 24, 2021
* Optimize multiple encodes

* Fix hashcode

* Revert "Fix hashcode"

This reverts commit 5866669.

* Test cache

* Fix UT

* Fix Smart contract cache

* Fix set without cache

* Improve

* Remove allowCache

* fix english

* Remove change
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.

3 participants