Version française
Home     About     Download     Resources     Contact us    
Browse thread
AW: [Caml-list] OCaml troll on Slashdot
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: AW: [Caml-list] OCaml troll on Slashdot
Bauer, Christoph wrote:
> There is an implementation of VLists for OCaml. VLists are - like
> single linked lists - persistent, but have better performance,
> require less memory and are GC friendlier.

This depends on the kind of operation you need: the VList.tl operation 
is more complex and always incurs memory allocation (this can be avoided 
  in theory, but it seem difficult to do it in OCaml). In particular, if 
you implement the map function using only VList.tl and VList.hd, the 
result will probably be much slower than with lists (of course, there is 
a more efficient VList.map, but it cannot be written using only the 
VList API).

-- Alain