`Nat.repr` was implemented by generating a list of `Chars`, each created by a 10-way if-then-else. This can cause significant slow down in some particular use cases. Now `Nat.repr` is `implemented_by` a faster implementation that uses C++’s `std::to_string` on small numbers (< USize.size) and maintains an array of pre-allocated strings for the first 128 numbers. The handling of big numbers (≥ USize.size) remains as before. |
||
|---|---|---|
| .. | ||
| lean.h | ||
| lean_gmp.h | ||