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: 2007-07-15 (13:16)
From: Gerd Stolpmann <info@g...>
Subject: Re: unboxed scalars - was [Caml-list] caml: camlp4 revised syntax
Am Sonntag, den 15.07.2007, 13:42 +0200 schrieb Basile STARYNKEVITCH:
> Besides, I am pretty sure than on current processors, unboxing scalars is probably more a win because of memory & cache 
> issues than because of the additional shift & add required to transform a 2n+1 into n or vice versa. Such ALU operations 
> are very cheap today.

Absolutely. Given that any non-trivial program spends 20-40% of its time
in garbage collection, the net effect is probably positive, i.e. the GC
becomes more faster because of the tagged int representation than the
additional ALU cycles cost. (Any unboxing without tagging will make the
GC algorithm more complex and thus slower.)

You don't see this net effect in too simplistic benchmarks since you
need test programs of certain complexity.

Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
Phone: +49-6151-153855                  Fax: +49-6151-997714