Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
validate bignumber.js big.js shiftedBy
(version: 0)
- https://github.com/MikeMcl/bignumber.js/tree/v9.0.1 - https://github.com/MikeMcl/big.js/tree/v6.0.3
Comparing performance of:
bignumber 1 vs bignumber 2 vs big 1
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--script src="https://raw.githubusercontent.com/iriscouch/bigdecimal.js/v0.6.1/lib/bigdecimal.js"></script--> <script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/9.0.1/bignumber.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/big.js/6.0.3/big.min.js"></script> <!--script src="https://raw.githubusercontent.com/infusion/Fraction.js/v4.0.12/fraction.min.js"></script-->
Tests:
bignumber 1
var a = new BigNumber("2.789654"); var b = a.times(new BigNumber(10).pow(18)).toFixed();
bignumber 2
var a = new BigNumber("2.789654"); var b = a.shiftedBy(18).toString();
big 1
const a = new Big("2.789654"); a.e = 18; a.toString();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
bignumber 1
bignumber 2
big 1
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'll break down the provided benchmark and its options, explaining what's being tested, compared, and their pros/cons. **Benchmark Overview** The MeasureThat.net benchmark compares the performance of three JavaScript libraries: 1. `bignumber.js` 2. `big.js` 3. `Big` All three libraries aim to provide decimal arithmetic with arbitrary-precision calculations. They are used for financial and scientific applications, among others. **Library Descriptions:** 1. **`bignumber.js`**: Created by Mike McLean, it's a widely-used JavaScript library for precise decimal arithmetic. It provides an implementation of the GNU Multiple Precision Arithmetic Library (GMP) in JavaScript. 2. **`big.js`**: Also known as "BigDecimal.js", it's another popular JavaScript library for decimal arithmetic. It implements the IEEE 754 floating-point standard, which is used by most programming languages. 3. **`Big`**: This library uses the `decimal.js` package and provides decimal arithmetic with a focus on precision and control. **Test Cases:** The benchmark consists of three test cases: 1. **`bignumber 1`**: Tests the performance of multiplying a number by 10 to the power of 18 using `bignumber.js`. 2. **`bignumber 2`**: Tests the performance of shifting a number by 18 positions using `bignumber.js`. 3. **`big 1`**: Tests the performance of incrementing and converting a decimal value in `Big`. **Comparison Options:** The test cases compare the performance of each library for the specific operations mentioned above. **Pros/Cons:** * **`bignumber.js`** * Pros: * Fastest execution time among all three libraries * Optimized for performance and scalability * Cons: * May lack some advanced features compared to other libraries * **`big.js`** * Pros: * More feature-rich than `bignumber.js` * Supports more operations and functions * Cons: * Slower execution time than `bignumber.js` * **`Big`** * Pros: * Provides more control over decimal arithmetic, especially for financial and scientific applications * Fast execution times are comparable to `big.js` **Special JS Features/Syntax:** None mentioned explicitly in the provided benchmark information.
Related benchmarks:
bignumber.js vs. big.js vs. decimal.js (no to string)
validate bignumber.js shiftedBy
bignumber.js vs. big.js vs. decimal.js@10.4.3 (I)
bigint vs. bignumber.js vs. big.js vs. break_infinity.js
Comments
Confirm delete:
Do you really want to delete benchmark?