prolog icon indicating copy to clipboard operation
prolog copied to clipboard

What would I measure, Prolog with or without garbage collection?

Open Jean-Luc-Picard-2021 opened this issue 6 months ago • 4 comments

Lets say this feature request would be realized:

feature request time/1 and/or statistics/2 predicate https://github.com/ichiban/prolog/issues/327

What would I measure a Prolog system with or without garbage collection? Is this documented somewhere?

For example Scryer Prolog has no garbage collection, and it still fails with this test case:

$ ulimit -m 2000000
$ ulimit -v 2000000
$ target/release/scryer-prolog -v
v0.9.4-135-g7cfe8ee5

$ target/release/scryer-prolog
?- [user].
app([], X, X).
app([X|Y], Z, [X|T]) :- app(Y, Z, T).
garbage(0, [0]) :- !.
garbage(N, L) :- M is N-1, garbage(M, R), app(R, R, L).
foo :- garbage(12,_), foo.

?- foo.
memory allocation of 2147483648 bytes failed
Aborted

The above preferably runs indefinitely. For example SWI-Prolog can run it indefinitely.

Jean-Luc-Picard-2021 avatar Aug 11 '24 09:08 Jean-Luc-Picard-2021