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-list] Does Caml have slow arithmetics ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Does Caml have slow arithmetics ?
On Thu, 2004-07-08 at 00:58, Xavier Leroy wrote:

> On the other hand, reducing inefficiencies already present in the
> source code isn't a priority.  

Of course that argument fails totally in one important
case -- Q: if you wanted a loop why didn't you use one?
A: tail-rec functional code is considered cute :)

I'm sure there are other cases .. would not:

let x = 1 in
let y = 1 in
let z = 1 in ...

be optimised into a single closure, not 3?
Or do i really have to write:

let x = 1 and y = 1 and z = 1 in ..

What's efficient depends on what's optimised which
depends on what idioms are considered 'cute' looking :)

BTW: there is another answer to the question Xavier asked:

Q: why did you write the code that way ..?
A: I didn't, it was generated..

which suggests sometimes there is a reason to optimise
'silly' looking code.

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: