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
Floating point optimization patch for OCaml bytecode
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Guichard <alphablock@w...>
Subject: Re: [Caml-list] Floating point optimization patch for OCaml bytecode

Thanks Jeffrey.

When OCaml is used as a scripting language (think animation-scripting) it
has to compete with popular scripting language such as Perl, Python, Ruby.
For many people the choice is a tradeoff between language facilities and
implementation performance.
So, yes, bytecode performance matters.

- damien

----- Original Message -----
From: "Jeffrey Mathews" <>
To: <>
Sent: Friday, September 16, 2005 1:21 AM
Subject: [Caml-list] Floating point optimization patch for OCaml bytecode

I know, I know -- why bother optimizing bytecode?  (Compelling reasons
have long been debated -- for me, it's a need to do dynamic- / meta-

Anyway, I've written a small patch for the OCaml bytecode compiler and
runtime that significantly improves the performance of a few
floating-point intensive benchmarks (from 30 to 40%) by reducing
boxing and unboxing of intermediate floating point results.

This is still preliminary work, and honestly I'm a little suspicious
that it works so well.  Testing has also been light -- it compiles and
runs my 'benchmark' script when patched against ocaml 3.08.1 and
3.08.4 (as well as MetaOcaml, though the patch needs a little

A short write-up can be found at

The patch is found at

I'd greatly appreciate feedback, criticism, testing on other platforms.

Thanks in advance,

Caml-list mailing list. Subscription management:
Beginner's list:
Bug reports: