caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Parametric and recursive classes and exponential typing
@ 2002-06-06 12:07 Frederic Tronel
  2002-06-06 13:44 ` Jacques Garrigue
  2002-06-06 14:22 ` [Caml-list] Parametric and recursive classes and exponential typing John Max Skaller
  0 siblings, 2 replies; 4+ messages in thread
From: Frederic Tronel @ 2002-06-06 12:07 UTC (permalink / raw)
  To: caml-list

Hi,

I'm facing the following problem:
I'm trying to compile a program with a lot of recursive and
parametric classes. Compilation time is getting longer and longer,
and the behavior seems rather chaotic. I mean that very small changes in
the code
can lead to huge extra compilation time. Is there any solution, am I
guarantee
that compilation will end up (more than 23 minutes for a single file
that is
not yet compiled !! at the moment).
I'm using ocaml 3.04 plus a patch for parametric classes.
Should I try the CVS ?

Frederic.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Parametric and recursive classes and exponential typing
  2002-06-06 12:07 [Caml-list] Parametric and recursive classes and exponential typing Frederic Tronel
@ 2002-06-06 13:44 ` Jacques Garrigue
  2002-06-06 14:11   ` [Caml-list] Parametric and recursive classes and exponentialtyping Frederic Tronel
  2002-06-06 14:22 ` [Caml-list] Parametric and recursive classes and exponential typing John Max Skaller
  1 sibling, 1 reply; 4+ messages in thread
From: Jacques Garrigue @ 2002-06-06 13:44 UTC (permalink / raw)
  To: Frederic.Tronel; +Cc: caml-list

From: Frederic Tronel <Frederic.Tronel@inrialpes.fr>

> I'm facing the following problem:
> I'm trying to compile a program with a lot of recursive and
> parametric classes. Compilation time is getting longer and longer,
> and the behavior seems rather chaotic. I mean that very small changes in
> the code
> can lead to huge extra compilation time. Is there any solution, am I
> guarantee
> that compilation will end up (more than 23 minutes for a single file
> that is
> not yet compiled !! at the moment).

Track down single coercions (_ :> t2) and replace them with full ones
(_ : t1 :> t2) as much possible. This improves predictability and
performance.

> I'm using ocaml 3.04 plus a patch for parametric classes.

What is your patch? Classes are already parametric, no?

> Should I try the CVS ?

Probably. As I explained some time ago, a few exponentials have been
tamed recently to linear or quadratic.
Note that now single coercion shouldn't bother you for performance
anymore, but they may be slightly weaker than before in some cases.

Jacques Garrigue
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Parametric and recursive classes and exponentialtyping
  2002-06-06 13:44 ` Jacques Garrigue
@ 2002-06-06 14:11   ` Frederic Tronel
  0 siblings, 0 replies; 4+ messages in thread
From: Frederic Tronel @ 2002-06-06 14:11 UTC (permalink / raw)
  To: Jacques Garrigue, caml-list

Jacques Garrigue wrote:
> 
> From: Frederic Tronel <Frederic.Tronel@inrialpes.fr>
> 
> > I'm facing the following problem:
> > I'm trying to compile a program with a lot of recursive and
> > parametric classes. Compilation time is getting longer and longer,
> > and the behavior seems rather chaotic. I mean that very small changes in
> > the code
> > can lead to huge extra compilation time. Is there any solution, am I
> > guarantee
> > that compilation will end up (more than 23 minutes for a single file
> > that is
> > not yet compiled !! at the moment).
> 
> Track down single coercions (_ :> t2) and replace them with full ones
> (_ : t1 :> t2) as much possible. This improves predictability and
> performance.
> 

Ok I'll try it.

> > I'm using ocaml 3.04 plus a patch for parametric classes.
> 
> What is your patch? Classes are already parametric, no?

A patch posted by Jerome Vouillon on this list to fix bug ID 841

--- typing/ctype.ml~    Thu Jan 31 13:57:23 2002
+++ typing/ctype.ml     Thu Jan 31 13:57:25 2002
@@ -1129,6 +1129,7 @@
   
   let create_recursion = (t2 != t2') && (deep_occur t1' t2) in
   occur env t1' t2;
+  occur env t1' t2;
   update_level env t1'.level t2;
   t1'.desc <- Tlink t2;



> 
> > Should I try the CVS ?
> 
> Probably. As I explained some time ago, a few exponentials have been
> tamed recently to linear or quadratic.
> Note that now single coercion shouldn't bother you for performance
> anymore, but they may be slightly weaker than before in some cases.
> 

I will give it a try. In the mean time, I have suppressed a mutual
dependance
between two classes, and recover a reasonnable behavior. 


Best regards,

Frederic.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] Parametric and recursive classes and exponential typing
  2002-06-06 12:07 [Caml-list] Parametric and recursive classes and exponential typing Frederic Tronel
  2002-06-06 13:44 ` Jacques Garrigue
@ 2002-06-06 14:22 ` John Max Skaller
  1 sibling, 0 replies; 4+ messages in thread
From: John Max Skaller @ 2002-06-06 14:22 UTC (permalink / raw)
  To: Frederic Tronel; +Cc: caml-list

Frederic Tronel wrote:

>Hi,
>
>I'm facing the following problem:
>I'm trying to compile a program with a lot of recursive and
>parametric classes. Compilation time is getting longer and longer,
>
>
>Should I try the CVS ?
>

I experienced a major performance improvement with the CVS version
except I was using polymorphic variants. It is worth a try IMHO.

-- 
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850




-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-06 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-06 12:07 [Caml-list] Parametric and recursive classes and exponential typing Frederic Tronel
2002-06-06 13:44 ` Jacques Garrigue
2002-06-06 14:11   ` [Caml-list] Parametric and recursive classes and exponentialtyping Frederic Tronel
2002-06-06 14:22 ` [Caml-list] Parametric and recursive classes and exponential typing John Max Skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).