package optint

  1. Overview
  2. Docs
Abstract type on integer between x64 and x86 architecture

Install

Dune Dependency

Authors

Maintainers

Sources

optint-v0.0.3.tbz
sha256=9279d910f0b49eef4e6c7201a2e6189a4866b12d42ce677b9c3d51458d1ef930
sha512=c696a4cee26666a1868a6d0ea5b441d6292468fd51c233b3d2036ee6df7a0cba9200747ba7287b8181ca29afce80433c2919fe84f5d7c9debcd5ce8c192e4ac4

Description

This library provide an abstract type which represents at least a 32-bits integer. On x64, this library use a native unboxed integer (63 bits). On x86, this library use a boxed int32.

Implementation depends on target architecture.

Published: 12 Sep 2019

README

Optint - Abstract type on integer between x64 and x86 architecture

This library provide one module Optint which use internally an int if you are in a x64 architecture or an int32 (boxed value) if you are in a x86 architecture. This module is really unsafe and does not care some details (like the sign bit) for any cast.

Goal

The main difference between an int and an int32 is the second is boxed. About performance this is not the best. However, you can not ensure to be in an x64 architecture where you can use directly an int instead an int32 (and improve performance).

So, this library provide an abstraction about a real int32. In a x64 architecture, internally, we use a int and in a x86 architecture, we use a int32. By this way, we ensure to have in any platform 32 free bits in Optint.t.

Dependencies (2)

  1. dune
  2. ocaml >= "4.07.0"

Dev Dependencies (2)

  1. fmt with-test
  2. crowbar with-test & >= "0.2"

Used by (7)

  1. checkseum != "0.2.0" & < "0.3.1"
  2. decompress >= "0.8" & < "1.1.0"
  3. git >= "3.0.0"
  4. mirage-kv-mem >= "3.2.1"
  5. mirage-kv-unix >= "3.0.0"
  6. rfc1951 < "1.0.0" | >= "1.4.0"
  7. tar-mirage >= "2.3.0"

Conflicts

None

OCaml

Innovation. Community. Security.