Thanks, Phil, for reminding me of this. I've committed a fix (0ad5aa8) for that. There was a tail-recursive function in your example that returned a tuple. Poly/ML puts these on the stack where it can but in this case it was causing the function to cease to be tail-recursive, eating up the stack. The reason for the regression was a change in the way tuples on the stack are handled in the 32-in-64 bit version. Your example now works as it used to.

Michael, it would be worth trying your code with the latest version to see if this has fixed it. If it hasn't then presumably it's a different problem and I'll have to investigate further.

David

On 16/06/2020 09:58, Phil Clayton wrote:
I also found that 5.8 can consume a huge amount of memory compared to 5.7.1.  In my case, it was a very small example doing simple arithmetic operations (demonstrating Fermat's method to find pairs of factors) so it may be related.  I have raised an issue for it:
https://github.com/polyml/polyml/issues/121

Phil

On 16/06/20 02:30, Norrish, Michael (Data61, Acton) wrote:
I have some HOL code that runs to completion in ~24 seconds user time.

On 5.7.1 it runs in about that much wall clock time too. (Unfortunately, this test is running on a different machine, necessarily, but this is an old Linux desktop which is far less powerful than the new Macbook Pro which is running 5.8.)

On 5.8 (updated for MacOS Catalina to the SHA above), wall clock time is 8 minutes.

The relevant code is the selftest in examples/miller/miller which is a big arithmetic normalisation.

On the Mac, memory consumption (as reported by the Activity Monitor) gets as high as 20GB; on the Linux machine running 5.7.1, the consumption remains very slight (top reports 3% in its %MEM column; the machine has 16GB)

Michael



_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to