The following is a comparison between stdlib big integers (old) and the specialized type (new) averaging 10 runs each: name old time/op new time/op delta --------------------------------------------------------------------------- Text/base_2 579ns ± 3% 496ns ± 2% -14.37% (p=0.000 n=10+10) Text/base_8 266ns ± 1% 227ns ± 1% -14.58% (p=0.000 n=10+10) Text/base_10 536ns ± 1% 458ns ± 2% -14.58% (p=0.000 n=10+10) Text/base_16 205ns ± 2% 180ns ± 4% -11.90% (p=0.000 n=10+10) Format/base_2 987ns ±15% 852ns ± 2% -13.64% (p=0.000 n=10+10) Format/base_8 620ns ± 6% 544ns ± 3% -12.31% (p=0.000 n=10+10) Format/base_10 888ns ± 1% 726ns ± 1% -18.25% (p=0.000 n=10+10) Format/base_16 565ns ± 1% 449ns ± 1% -20.41% (p=0.000 n=10+10) name old allocs/op new allocs/op delta -------------------------------------------------------------------------- Text/base_2 2.00 ± 0% 2.00 ± 0% ~ (all equal) Text/base_8 2.00 ± 0% 2.00 ± 0% ~ (all equal) Text/base_10 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.000 n=10+10) Text/base_16 2.00 ± 0% 2.00 ± 0% ~ (all equal) Format/base_2 5.00 ± 0% 3.00 ± 0% -40.00% (p=0.000 n=10+10) Format/base_8 5.00 ± 0% 3.00 ± 0% -40.00% (p=0.000 n=10+10) Format/base_10 6.00 ± 0% 3.00 ± 0% -50.00% (p=0.000 n=10+10) Format/base_16 5.00 ± 0% 3.00 ± 0% -40.00% (p=0.000 n=10+10) This is part of a series of commits to fully implement the uint256 package. |
||
|---|---|---|
| .. | ||
| fees | ||
| limits | ||
| mempool | ||
| mining | ||
| netsync | ||
| progresslog | ||
| rpcserver | ||
| staging/primitives/uint256 | ||
| version | ||