Dear GHC-Freaks,

I need some expert help on a program of mine. The program benchmarks
several implementations of functional priority queues. Basically, it
evaluates different expressions using different implementations of
priority queues: binary heaps, Braun heaps, pairing heap, leftist heaps
etc. I thought it possible to do this in one round. Unfortunately, it
appears that the heap space a particular implementation requires is
never freed. Consequently, after a few tests the heap space is
exhausted. I *suspect* this to be a compiler bug. Here is what
happens:

> ghc Test/TestPQ.lhs -H32M
[...]
> a.out +RTS -K8M -H64M -Sstderr -F2s
[...]
** Running persistent pairing heap on /\ (random)
32000000 64000000 12807228  20.0%  0.87  2.67    2.09    6.88    0    0    47   14   2 
 95 10353840    188   2248  2s
0
[...]
** Running binary tree on /\ (increasing)
19192736 64000000 22989548  35.9%  1.38  3.24    4.03   11.74    0    0  7637 7628   4 
118 22005696  30548 152588  2s
0
** Running Braun tree on /\ (increasing)
 9010216 64000000 25944680  40.5%  1.50  3.20    5.79   15.50    0    0  12403 8265   
4 118 24090204  49612 165328  2s
 6055308 64000000 30987956  48.4%  1.77  3.26    7.65   18.94    0    0  20381 11348   
2 118 28974600  81524 226992  2s
Heap exhausted;

The output `0' indicates that the respective test was successful.
Consequently the heap space could be freed, but instead the residency
steadily increases.

I refrain from sending the source program along since it is quite big
(16K). In case somebody is willing to help I'll send it in a seperate
mail.

Ralf

Reply via email to