[Haskell-cafe] Re: OCaml list sees abysmalLanguage Shootoutresults

Simon Marlow simonmar at microsoft.com
Fri Oct 8 11:54:27 EDT 2004

On 08 October 2004 13:36, Robert Dockins wrote:

> BTW can you give some references to these known techniques?

Hmm, well here's some folklorish ideas.  I'm sure there are references
for most of these, but I don't know them off hand.

  - Have another list constructor that has 2 (or more) elements.
    Prelude funnctions can take advantage of this, but the constructor
    can magically transform itself into ordinary cons cells when it
    is examined by an ordinary pattern match.

  - take this further and have list cells with 2 (or more) unboxed
    characters, or even a full buffer.

  - use space-saving techniques for storing list cells: eg. remove the
    tail pointer when cells appear next to each other in the heap,
    or have a memory page just for list cells and omit the info
    Or just improve cache behaviour by trying to store list cells
    adjacent in the heap.


More information about the Haskell-Cafe mailing list