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

bn: introduce small pow, .pown() [WIP] #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

bn: introduce small pow, .pown() [WIP] #123

wants to merge 2 commits into from

Conversation

axic
Copy link
Contributor

@axic axic commented Feb 4, 2016

Compared to the benchmarks in #121 it performs as:

bn.js pown#pow x 11,994 ops/sec ±3.01% (9 runs sampled)
bn.js ipown#pow x 11,417 ops/sec ±5.09% (9 runs sampled)

However on bigger powers it is different. Take this PR as a WIP at the moment.

@axic axic changed the title bn: introduce small pow, .pown() bn: introduce small pow, .pown() [WIP] Feb 4, 2016
@alidavut
Copy link

Any update?

@axic
Copy link
Contributor Author

axic commented May 17, 2021

I think technically works (but would need a rebase and confirming it still works), however perhaps the gain wasn't significant enough at the time?

If there's interest getting this merged, I can rebase it.

@alidavut
Copy link

I'm new at bn.js and in my first day I needed a function like this. Current pow function needs a BN instance which is not usable much for standard js numbers, adds extra code. @indutny ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants