Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] O'Caml vs C++: a little benchmark
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oleg <oleg_inconnu@m...>
Subject: Re: [Caml-list] O'Caml vs C++: a little benchmark
On Friday 23 August 2002 05:05 pm, John Max Skaller wrote:
> Oleg wrote:
> > I'm curious as to where these huge differences for these small programs
> > come from.
>
> Perhaps .. here
>
>
> 	single_pass xb (sum +. float x)
>
>
> you have a float conversion -- creates a new heap element.
> Try changing the tests to do integer operations,
> they should be comparable then.

The C++ version contains the same conversion (with the exception that int is 
native, but that's the price O'Caml is willing to pay, right?)  And why heap? 

BTW does O'Caml inline tail-recursive functions?

Cheers
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners