@hackage adaptive-containers0.2

Self optimizing container types

  • Categories

    • License

      BSD-3-Clause

    • Maintainer

      Don Stewart (dons@galois.com)

    • Versions

      • 0.3 Sat, 11 Apr 2009
      • 0.2.1 Mon, 6 Apr 2009
      • 0.2 Mon, 6 Apr 2009
      • 0.1 Sun, 5 Apr 2009

    Self optimizing polymorphic container types.

    Adaptive containers are polymorphic container types that use class associated data types to specialize particular element types to a more efficient container representation. The resulting structures tend to be both more time and space efficient.

    A self-optimizing pair, for example, will unpack the constructors, yielding a representation for (Int,Char) requiring 8 bytes, instead of 24.

    This difference can be visualized, here for the value:

    [ (x,y) | x <- [1..3], y <- [x..3] ]

    Currently supported adaptive types: pairs, lists