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@p...>
Subject: compiling large file hogs RAM and takes a long time.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wrote a parser generator for a tick data file.
The generated OCaml file is ~1Mb and contains ~120 variant type
definitions (each with 2 to ~100 variants) plus one polymorphic variant
type.
When I compiled it with ocamlopt (3.09.3), it took almost 10 minutes and
consumed ~500MB RAM (Firefox and Thunderbird were killed by the kernel
to make space for ocamlopt).
I run Linux 2.6.18.8 on a dual CPU Pentium D 2.80GHz with 1GB of RAM.
(in 32-bit mode)

So, is this something to be expected? 10 min / 500MB seems like a little
bit excessive to me, given that the file is really very simple conceptually.

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

iD8DBQFGZuEfPp1Qsf2qnMcRAjSYAKCFD4QBQdxk7qCGRb2LyHPHz5QrSQCgmjLl
yxHaXIU7wK6j+gWhG+zbZvA=
=nfep
-----END PGP SIGNATURE-----