Browse thread
[Caml-list] Alpha optimizations
- Falk Hueffner
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Falk Hueffner <falk.hueffner@s...> |
| Subject: | [Caml-list] Alpha optimizations |
Hi,
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)
or
sra $16, 1, $3
sra $16, 1, $4
I'm not sure how to avoid this, though; perhaps some postprocessing
would be appropriate?
Falk
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr