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
AST versus Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-11-06 (15:38)
From: Jan Kybic <kybic@f...>
Subject: Re: [Caml-list] Re: ATS versus Ocaml
>I notice that in ATS you have to give the type of the array explicitly

  fn bubble_sort (a : array0 double ) : void =

> so you should also do so in the OCaml code, using

You are right, I am sorry for this omission. Having done that, the
ration between Ocaml and ATS times drops to 3:1 (Ocaml being slower).

>Do you know if ATS is performing array bound checking? The OCaml code is
>nearly 2X faster with -unsafe than without.

Yes, I think the ATS code does perform bound checking. There is
probably a way to avoid it but I do not know how to do it yet.

With "ocamlopt -unsafe", the ratio drops further to 2:1 

> Are you using amd64 architecture ?

No. Standard Intel x86.


Jan Kybic <>                       tel. +420 2 2435 5721                      ICQ 200569450