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] Obj.magic, Obj.t etc.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] Obj.magic, Obj.t etc.
From: "Marcin 'Qrczak' Kowalczyk" <>
> Dnia czw 14. sierpnia 2003 10:34, Jacques Garrigue napisa³:
> > As a result, the representation of float arrays would not be uniform,
> > requiring a check before access, which would probably neutralize any
> > performance advantage of having a special representation.
> But now the check is required before polymorphic access. It happens in inner 
> loops in almost all functions from the Array module.

True, but you're not supposed to use polymorphic code for
high-performance computing. By the way you're not supposed to use
functionals either: the prefered approach, according to Xavier Leroy's
memo, is monomorphic code and for loops. Of course this limitation
only concerns inner loops.

My point was that even monomorphic code would need checks, reducing the
interest of float arrays to nil.

If you want to interpret my point as meaning that the current
dynamically distinguished float arrays are a bad idea (costly in
polymorphic cases, and limiting the semantics), you're free to do so.
I believe some designers of the language think so too.

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