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
caml: camlp4 revised syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] caml: camlp4 revised syntax
On Sun, Jul 15, 2007 at 12:48:42PM +0200, wrote:
> 1) The internal integer coding:
> It seems that an integer of value "x" is internally stored like "2x*1" ( 
> x shift 1 or 1 ). That is a loss of performance, not only when doing 
> calculations, but also, by example, when using the integer as index of a 
> string character, ... . Usage of native-int doesn't improves the subject.

The cost is not as great as you think:

You also need to take into account the benefit of this representation
in other areas (eg. the GC).  Let's see you compare the performance of
real programs before jumping to conclusions.


Richard Jones
Red Hat