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] Alpha optimizations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-11-26 (01:28)
From: Falk Hueffner <falk.hueffner@s...>
Subject: [Caml-list] Alpha optimizations

I noticed that there are some small optimizations possible for Alpha,
e. g. s4addq with immediate values, or multiplication with 2.0 as
add. Is there any interest in patches for that?

Also, would it be reasonably easy to unbox floats in tail recursive
leaf functions? This would speed up code tremendously like

let rec do_iter i zr zi =
  let zr2 = sqr zr and zi2 = sqr zi in
    if i >= maxiter || zr2 +. zi2 >= 4.0
    then i
    else do_iter
        (i + 1)
        (zr2 -. zi2 +. cr)
        (2.0 *. zr *. zi +. ci)

which is currently 7.5 times slower than C.

Also, OCaml frequently emits redundant instructions like

        ldt     $f13, 0($18)
        ldt     $f14, 0($18)
        sra     $16, 1, $3
        sra     $16, 1, $4

I'm not sure how to avoid this, though; perhaps some postprocessing
would be appropriate?


Bug reports:  FAQ:
To unsubscribe, mail  Archives: