Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
            times();;
or
            let foo = times();;
into the toplevel, the system indicates that "times" is not bound.
 
Collin Monahan