Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml image blending performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] OCaml image blending performance
On Thursday 07 February 2008 14:10:22 Ilmari Heikkinen wrote:
> On Feb 7, 2008 1:34 AM, Jon Harrop <jon@ffconsultancy.com> wrote:
> > In this case, most of the speed loss can be regained by simply
> > aggressively inlining everything, which is exactly what you (ab)used C
> > macros for in the C code.
>
> The C macros were more about making the code shorter by emulating HOFs,
> blend2.ml does inline everything. Coming within 2x of C with no major
> hackery on this sort of code is impressive though.

Getting within 2x of C is often regarded as disappointing in the OCaml 
community. :-)

I've played with some similar int-intensive algorithms and never managed to 
get close to C. OCaml's float performance is where it really shines.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e