PreviousUpNext

13.4.154  tagged_unt

The standard library tagged_unt package implements 31-bit unsigned integer arithmetic on 32-bit architectures (and eventually 63-bit integer arithmetic on 64-bit architectures).

The major advantage of 31-bit unsigned integers over 32-bit integers in the Mythryl context is that typeagnostic lists, vectors etc. can store 31-bit integers in a single machine word (i.e., in pointer), using a one-bit tag to distinguish them from pointer values, whereas 32-bit integers must be stored in separate records at significant overhead in time and space. (This use of 31-bit tagged unsigned integers is very similar to what is done in traditional Lisp implementations.)

The tagged_unt package implements the Int API.

The tagged_int package source code is in src/lib/std/tagged-unt.pkg.

See also: tagged_int.

See also: unt.

See also: one_word_unt.

See also: two_word_unt.

See also: multiword_int. The above information is manually maintained and may contain errors.

Unt

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext