### 1 unstable release

0.1.0 | May 22, 2023 |
---|

#**1762** in Math

**Apache-2.0**

10KB

165 lines

# tinymath

Experimental routines for performing arithmetic on small data types.

This focus of this crate is currently on functions to perform operations
of the form

. Normally this operation requires using the
integer one size larger than the size of `a * b / 2^c`

`a`

and `b`

, but this crate
performs these operations without resorting to a larger integer type.The included Criterion benchmarks indicate that, individually, these operations are slightly faster than the equivalent operations utilizing the larger integer type.

The motivation to write this crate was to experiment with vectorization; in theory, 8 ops in i8 could take as long as 4 ops in i16. This has not been definitively measured.

This is not an officially supported Google product.

###
`lib.rs`

:

Routines for performing arithmetic on small data types.

This focus of this crate is currently on functions to perform operations
of the form

. Normally this operation requires using the
integer one size larger than the size of `a * b / 2^c`

`a`

and `b`

, but this crate
performs these operations without resorting to a larger integer type.The included Criterion benchmarks indicate that, individually, these operations are slightly faster than the equivalent operations utilizing the larger integer type.

The motivation to write this crate was to experiment with vectorization; in theory, 8 ops in i8 could take as long as 4 ops in i16. This has not been definitively measured.

This is not an officially supported Google product.