Browse thread
compiling large file hogs RAM and takes a long time.
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Sam Steingold <sds@g...> |
| Subject: | Re: compiling large file hogs RAM and takes a long time. |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jacques Garrigue wrote: >>> Any chance there is some quadratic code in polymorphic variant type >>> processing?! >> There is, and this is a known problem: >> http://caml.inria.fr/mantis/view.php?id=4053 >> >> I'm sorry, but I don't see any easy way out. >> At least on the basic time complexity. >> However, the space complexity could be improved, if I find what is >> gobbling memory so fast. > > I found the reason, and this is now fixed in CVS 3.10. > I can now compile a pattern matching with 3000 cases in 10s and just > 10MB, which is better than 40s and 250MB before :-) I observe a time reduction of 40% (from 10 minutes down to 6 minutes) and RAM usage reduction of 60% (from 450MB down to 160MB) for my (generated) file. Very nice, thanks! > This doesn't change the quadratic time complexity, but as other > mentioned, constants do matter. Indeed, but it appears that in this case improving constants does not solve the problem completely. Sam. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGcrMoPp1Qsf2qnMcRAu6EAJ449kDgvpfKPSRoI1vlIiLqjNcILwCeMvi9 6EWbtykwW5kD62QvxW/hU6Y= =XRSH -----END PGP SIGNATURE-----