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

Enormous CPU times using large DECIMAL_PLACES with hex numbers #342

Open
Meemaw opened this issue Mar 25, 2023 · 0 comments
Open

Enormous CPU times using large DECIMAL_PLACES with hex numbers #342

Meemaw opened this issue Mar 25, 2023 · 0 comments

Comments

@Meemaw
Copy link

Meemaw commented Mar 25, 2023

Seeing some enormous CPU times when using high DECIMAL_PLCAES config with hex numbers. The following code takes ~30s to finish on a high end computer.

Removing the DECIMAL_PLCAES option (or making it smaller), maker things better.

import { BigNumber } from "bignumber.js";

BigNumber.config({
  DECIMAL_PLACES: 1e9
});

BigNumber("0x9a864287d")
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

No branches or pull requests

1 participant