Version française
Home     About     Download     Resources     Contact us    
Browse thread
Pervasives.compare output type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] Re: Pervasives.compare output type
Jason Hickey wrote:

>>
>> let f1  x       y = Pervasives.compare x y
>> let f2 (x: int) y = Pervasives.compare x y
>> let f3  x       y = if x=y then Pervasives.compare "s1" "s2" else if x 
>> < y then -1 else 1
>> let f4 (x: int) y = if x=y then Pervasives.compare "s1" "s2" else if x 
>> < y then -1 else 1
>> let f5  x       y = let i = Pervasives.compare x y in if i = 0 then 
>> Pervasives.compare "s1" "s2" else i
>> let f6 (x: int) y = let i = Pervasives.compare x y in if i = 0 then 
>> Pervasives.compare "s1" "s2" else i
>> let f7  x       y = match Pervasives.compare x y with 0 -> 
>> Pervasives.compare "s1" "s2" | i -> i
>> let f8 (x: int) y = match Pervasives.compare x y with 0 -> 
>> Pervasives.compare "s1" "s2" | i -> i
>>
>> let time name f =
>>   

I am unsure as to how to interpret these benchmarks...

Alex


-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>