Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] time complexity on basic data types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-08-23 (16:11)
From: Collin Monahan <cmonahan@f...>
Subject: [Caml-list] time complexity on basic data types
Thanks to everyone who answered my questions yesterday. 
With respect to arrays and lists, is the complexity for operations on
these data structures like "normal?" E.g. random access in arrays in
constant time, insertion in lists in constant time, random access in
lists in linear time . . .
What facilities exist for timing constructs in Caml? I see 
            val times : unit -> process_times
in the manual, under unix system calls. If this is like the times()
function in Solaris, then it would work. But I think the Caml syntax is
messing me up again, because if I type
            let foo = times();;
into the toplevel, the system indicates that "times" is not bound.
Collin Monahan