Skip to content

craigfe/compact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compact

Memory-efficient data structures for OCaml

OCaml-CI Build Status


Currently provides the following modules:

  • Hashset: an unordered set container. Comes with three specialisations:

    • Immediate, for elements with an immediate representation (e.g. int).
    • Immediate64, for elements with an immediate representation on 64-bit platforms only (e.g. Int63.t).
    • Fixed_size_string, for elements that are strings of a fixed length.
  • Hashtbl: an unordered associative container.

  • Hashed_container: a generic hashtable implementation with support for externally-allocated bindings.

  • Arena: an arena for fixed-width strings;

  • Uniform_array: an array implementation that forbids the flat float array optimisation. Comes with Tuple2 and Tuple3 specialisations for compact arrays of pairs and triples.

See the ./bench subdirectory for benchmarks (and benchmark results) for the above modules.

Installation

Compact can be installed with opam:

opam pin add -n compact.dev git+https://github.com/CraigFe/compact
opam install compact

Acknowledgements

This library pulls code and ideas from various open-source Jane Street libraries, including a uniform array implementation from Base.

About

Memory-efficient data structures in OCaml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published