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-07 (01:56)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] Re: ATS versus Ocaml
From: Jan Kybic <>
>>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.

The whole point of ATS is to use a richer type system to avoid many
runtime checks. Static check of bounds is supposedly one of them.
If your program is written with the clever .<n>. annotations (I don't
remember the exact syntax), then there should be no bound checks at
Not that this is not equivalent to ocaml's -unsafe: the program is
still safe, since the checks were done at compile time.

Jacques Garrigue