Skip to content

Commit 7203d2e

Browse files
committed
feat: micro-optimizations
1 parent 5630693 commit 7203d2e

File tree

3 files changed

+244
-197
lines changed

3 files changed

+244
-197
lines changed

src/big-decimal/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,19 @@ Benchmarked at precisions 50, 100, and 500. Representative speedups:
122122

123123
| Operation | p=50 | p=100 | p=500 |
124124
| ---------- | ------ | ------- | -------- |
125-
| add | ~1x | ~1x | ~1x |
126-
| sub | 3.5x | 4.0x | 1.6x |
127-
| mul | 7.6x | 3.2x | 6.5x |
128-
| div | 1.9x | 1.6x | 3.2x |
129-
| eq | 5.0x | 3.5x | 7.3x |
130-
| sqrt | 6.3x | 8.6x | 43x |
131-
| cbrt | 12x | 24x | 166x |
132-
| exp | 7.7x | 13x | 42x |
133-
| ln | 2.7x | 6.6x | 15x |
134-
| sin | 3.6x | 4.0x | 3.8x |
135-
| cos | 3.3x | 3.7x | 4.2x |
136-
| atan | 48x | 112x | 410x |
137-
| asin | 55x | 90x | 381x |
125+
| add | 1.9x | ~1x | ~1x |
126+
| sub | 2.8x | 4.0x | 1.6x |
127+
| mul | 8.3x | 4.2x | 6.6x |
128+
| div | 2.4x | 1.4x | 3.4x |
129+
| eq | 5.3x | 8.5x | 8.8x |
130+
| sqrt | 7.0x | 7.8x | 40x |
131+
| cbrt | 13x | 20x | 153x |
132+
| exp | 9.0x | 13x | 44x |
133+
| ln | 2.7x | 7.3x | 11x |
134+
| sin | 3.5x | 3.7x | 3.8x |
135+
| cos | 3.5x | 3.5x | 4.4x |
136+
| atan | 72x | 120x | 599x |
137+
| asin | 35x | 87x | 208x |
138138

139139
Accuracy is identical: both libraries produce the same significant digits at
140140
every tested precision (verified via cross-validation tests).

0 commit comments

Comments
 (0)