lean4-htt/src/include/lean
Joachim Breitner 504336822f
perf: faster Nat.repr implementation in C (#3876)
`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.
2024-04-17 18:11:05 +00:00
..
lean.h perf: faster Nat.repr implementation in C (#3876) 2024-04-17 18:11:05 +00:00
lean_gmp.h fix: do not dllexport symbols in core static libraries (#3601) 2024-03-15 11:58:34 +00:00