English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Pervasives.{min,max} not specialized to floats by ocamlopt
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-18 (15:37)
From: Will M Farr <farr@M...>
Subject: Re: [Caml-list] Pervasives.{min, max} not specialized to floats by ocamlopt

On Aug 18, 2006, at 11:34 AM, Olivier Andrieu wrote:

> Indeed. That's because min and max are not primitives provided by the
> runtime library but regular caml functions from pervasives.ml :
> ,----
> | let min x y = if x <= y then x else y
> | let max x y = if x >= y then x else y
> `----

In this case, it seems strange that they weren't inlined---when I  
defined my own min and max functions, *they* were inlined.  Could it  
be because I was working inside a functor, or am I mistaken in my  
belief that ocaml does cross-module inlining?