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

benchmark: support github.com/MikeMcl/bignumber.js #88

Closed
wants to merge 1 commit into from
Closed

benchmark: support github.com/MikeMcl/bignumber.js #88

wants to merge 1 commit into from

Conversation

axic
Copy link
Contributor

@axic axic commented Dec 16, 2015

No description provided.

@axic axic mentioned this pull request Dec 16, 2015
@indutny
Copy link
Owner

indutny commented Dec 16, 2015

It seems like bignumber#sub: is crashing. Apart from this, do you think adding this library to benchmarks will provide any value? It doesn't seem like any of covered functions are faster in bignumber.

@axic
Copy link
Contributor Author

axic commented Dec 19, 2015

Thankfully it is not anywhere near to bn.js. I have a couple of projects I would like to convince to switch to bn.js form bignumber and having benchmarks certainly helps.

Didin't notice .sub not working, strange.

@axic
Copy link
Contributor Author

axic commented Jan 24, 2016

@indutny rebased against master and fixed .sub. All the methods in bignumber.js are faster than silentmatt-biginteger.

@indutny
Copy link
Owner

indutny commented Jan 24, 2016

Ah, closing this :)

@indutny indutny closed this Jan 24, 2016
@axic
Copy link
Contributor Author

axic commented Jan 24, 2016

To the defend the point of this, here's a comparison of github stars, npm dependents and npm downloads last month of each of the bignum libraries used currently in benchmarks:

  • bignum (node-bignum), 211 stars, 49 deps, 51,687 downloads
  • sjcl (eccjs), 41 stars, 5 deps, 86 downloads
  • bigi 8 stars, 39 deps, 6171 downloads
  • js-big-integer 10 stars, 9 deps, 50 downloads
  • biginteger 133 stars, 2 deps, 93 downloads

How bignumber compares:

  • bignumber.js 667 stars, >50 deps, 333,311 downloads

Note: the package sjcl should be used instead of eccjs as it is more up to date and has more users: 3113 stars, 42 deps, 5396 downloads

My points is that benchmarks should be made against:
a) better performing libraries;
b) widely used libraries.

@indutny
Copy link
Owner

indutny commented Jan 24, 2016

Alright, let's throw away biginteger then, and replace it with bignumber.js.

@indutny
Copy link
Owner

indutny commented Jan 24, 2016

Also good point about sjcl.

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.

3 participants