#integer #slice #optimized #precision #sign #store #larger

smallint

A library for optimized arbitrary precision integers

4 releases

0.2.2 Aug 8, 2022
0.2.1 Aug 3, 2022
0.2.0 Aug 3, 2022
0.1.0 Aug 3, 2022

#2333 in Algorithms

Download history 3/week @ 2024-02-22 1/week @ 2024-02-29 14/week @ 2024-03-07 97/week @ 2024-03-14

115 downloads per month

MIT license

55KB
1.5K SLoC

A crate for small integer optimization. Provides the SmallInt type. When possible this will inline an integer and store it on the stack if that integer is small. However, for larger values, this will be instead stored on the heap as a pointer to a u32 slice, a length, and a sign.

Dependencies

~99KB