From: Alex Baretta <alex@baretta.com>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] "Nasty" functions and memory usage
Date: Sat, 17 Mar 2001 02:35:47 +0100 [thread overview]
Message-ID: <3AB2BF73.75CD2B03@baretta.com> (raw)
I have been waiting some ten minutes or so, now, for my Pentium
200 to calculate the type of nasty function number 5...
let f0 = function x,y -> x,y;;
let f1 = function x,y -> f1(f0 x, f0 y);;
let ...
let f5 = function x,y -> f5(f4 x, f4 y);;
... and I have reason to believe I will still have to wait a long
long time if I want to see the result.
The question is the following: the problem of calculating the type
of fN is DSPACE(2**(2**N))-hard, as far as I understand ...(I have
evidence, too! The type of f4 was so long it took the machine
several minutes only to print it to the screen once it had it
calculated.)
So how can the memory usage of the ocaml interpreter be constant
at 2200Kb? Here's my top screen...
2:31am up 15:37, 5 users, load average: 1.08, 1.05, 0.71
57 processes: 54 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 95.5% user, 4.4% system, 0.0% nice, 0.0% idle
Mem: 257720K av, 197864K used, 59856K free, 59456K shrd,
68852K buff
Swap: 264804K av, 1848K used, 262956K free
72172K cached
PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME
COMMAND
1902 root 19 0 2220 2220 512 R 0 92.1 0.8 16:29
ocaml
1936 root 5 0 868 868 668 S 0 3.7 0.3 0:20
top
The value has been constant at least since I started checking it,
about ten minutes ago.
Please, gurus, explain...
Alex
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
next reply other threads:[~2001-03-17 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-17 1:35 Alex Baretta [this message]
[not found] ` <E14exRm-0001kT-00@ithif51>
2001-03-19 15:25 ` Alex Baretta
2001-03-19 16:01 ` Sebastien Carlier
2001-03-22 14:22 ` Xavier Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AB2BF73.75CD2B03@baretta.com \
--to=alex@baretta.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox