Version française
Home     About     Download     Resources     Contact us    
Browse thread
compiling large file hogs RAM and takes a long time.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sam Steingold <sds@g...>
Subject: Re: large parametrized polymorphic variant type combinations take forever to compile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jacques Garrigue wrote:
> From: Sam Steingold <sds@gnu.org>
>> === f.ml ===
>> type ('a,'b,'c) t3 = [
>> | ('a,'b) F1.t1
>> | ('a,'b,'c) F2.t2
>> ]
>>
>> let f ~fa ~fb ~fc = function
>>   | # F1.t1 as x -> F1.f ~fa ~fb x
>>   | # F2.t2 as x -> F2.f ~fa ~fb ~fc x
>> === f.ml ===
> In particular, you may not be aware that #F1.t1 and #F2.t2 are
> actually expanded internally into huge or-patterns, which have to be
> type-checked. 

are there any type declarations that I could add to improve performance?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGk5S0Pp1Qsf2qnMcRApD3AJ0RJvmUcPxFZd7B6GJNb+rmSQi32QCfaCHZ
l0ta9Bm7mv1gE8D1/yhSdwU=
=jOxd
-----END PGP SIGNATURE-----