Dear all,
Jose Divas?n and I wrote a short paper for a Spanish workshop on functional programming ("Taller de Programaci?n Funcional 2013", http://babel.ls.fi.upm.es/tpf2013/) in which we test a SML program obtained with the Isabelle code generator tool to perform the Gauss Jordan elimination algorithm over matrices.
We carried out performance experiments with MLton and Poly/ML with three different types of matrices. Matrices whose inputs were real numbers (SML type Real.real), matrices whose inputs were fractions of integers (IntInf.int) and also matrices whose inputs where an ad hoc implementation of the field Z2 by means of "0::IntInf.int" and "1::IntInf.int". The code generation process and the types mapping from Isabelle to SML are explained in pp. 1 - 4 of the article. The benchmarks comparing Poly/ML and MLton performance are detailed in pp. 4 - 8.
Briefly, the results show that:
- Poly/ML 5.5 performs better than MLton with matrices over Z2 (see page 6); - MLton behaves better than Poly/ML with matrices whose inputs are fractions of "IntInf.int" (see page 7); - Poly/ML 5.2 outperforms MLton over matrices of type "Real.real", but reaches a segmentation fault with matrices of size 800 * 800 (in computers with a RAM of 4GB). Quite surprisingly for us, Poly/ML 5.5 performs worse than Poly/ML 5.2 over matrices with inputs of type "Real.real".
Our intention was just to identify the best performing setting (for compilation and execution) for our future work with matrices, and we did not get to explore the roots and reasons of the previous results. Anywhere, we considered that the results could be interesting for somebody in the mailing list. We would also be very pleased to get any feedback on the reasons for the previous results.
The paper is available in the following link http://wiki.portal.chalmers.se/cse/uploads/ForMath/pavlap
Thanks in advance for your interest,
Jesus
-- Jes?s Mar?a Aransay Azofra Universidad de La Rioja Dpto. de Matem?ticas y Computaci?n tlf.: (+34) 941299438 fax: (+34) 941299460 mail: jesus-maria.aransay at unirioja.es ; web: http://www.unirioja.es/cu/jearansa Edificio Luis Vives, c/ Luis de Ulloa s/n, 26004 Logro?o, Espa?a
Hi Jesus,
On 25/07/2013 11:29, Jesus Aransay wrote:
Jose Divas?n and I wrote a short paper for a Spanish workshop on functional programming ("Taller de Programaci?n Funcional 2013", http://babel.ls.fi.upm.es/tpf2013/) in which we test a SML program obtained with the Isabelle code generator tool to perform the Gauss Jordan elimination algorithm over matrices.
That is interesting work. Is it possible to get a copy of the code you ran for the various tests so I can check this out?
Briefly, the results show that:
- Poly/ML 5.5 performs better than MLton with matrices over Z2 (see page 6);
- MLton behaves better than Poly/ML with matrices whose inputs are
fractions of "IntInf.int" (see page 7);
- Poly/ML 5.2 outperforms MLton over matrices of type "Real.real", but
reaches a segmentation fault with matrices of size 800 * 800 (in computers with a RAM of 4GB). Quite surprisingly for us, Poly/ML 5.5 performs worse than Poly/ML 5.2 over matrices with inputs of type "Real.real".
Did you get the seg fault when you ran it with 5.5 or was this only with 5.2? I'd certainly like to fix any seg faults in the current version. I did find a problem in the 5.5 garbage collector with large arrays that may account for the worse performance compared with 5.2. That was fixed in commit 1705 in SVN but it would be good to check that out.
Anyway, thanks for posting that.
Best regards, David
On Thu, Jul 25, 2013 at 8:03 AM, David Matthews <David.Matthews at prolingua.co.uk> wrote:
On 25/07/2013 11:29, Jesus Aransay wrote:
Jose Divas?n and I wrote a short paper for a Spanish workshop on functional programming ("Taller de Programaci?n Funcional 2013", http://babel.ls.fi.upm.es/tpf2013/) in which we test a SML program obtained with the Isabelle code generator tool to perform the Gauss Jordan elimination algorithm over matrices.
That is interesting work. Is it possible to get a copy of the code you ran for the various tests so I can check this out?
Seconded! I would love to investigate why MLton is performing so poorly on the input processing.
-Matthew