Skip to content
/ tinymath Public

Experimental routines for performing arithmetic on small data types

License

Notifications You must be signed in to change notification settings

sffc/tinymath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinymath

crates.io

Experimental routines for performing arithmetic on small data types.

This focus of this crate is currently on functions to perform operations of the form a * b / 2^c. Normally this operation requires using the integer one size larger than the size of 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.

About

Experimental routines for performing arithmetic on small data types

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages