Commit 40d1439
committed
Prevent allocs for FD{Int128} by freeze max_exp10
Before this commit, reinterpret(FD{Int128,f}, x) allocates because:
1. max_exp10(Int128) widens the Int128 to a BigInt, which causes
allocations.
2. The result of max_exp10(Int128) isn't getting const-folded away, so
the above widen operation occurs every time it's called at runtime.
This commit simply "freezes" the result for Int128s via a top-level
`@eval` statement.1 parent 1768c58 commit 40d1439
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| |||
0 commit comments