TAK como prueba de rendimiento

A partir del artículo La función de Takeuchi como banco de prueba para la eficiencia y sus comentarios he estado investigando sobre su uso. En este artículo resumo el resultado de las indagaciones.

La función de Takeuchi se utiliza en la prueba TAK cuyo creador es Richard P. Gabriel según afirma en su libro Performance and evaluation of LISP systems (MIT Press, 1985). En las páginas 81-91 de su libro describe la prueba TAK. En concreto,  indica su objetivo (p. 81)

The TAK benchmark is a variant of the Takeuchi function that  Ikuo Takeuchi of Japan used as a simple benchmark. Because Tak is function-call-heavy, it is representative of many Lisp programs. On the other hand, because it does little else but function calls (fixnum arithmetic is performed as well), it is not representative of the majority of Lisp programs. It is only a good test of function call and recursion, in particular.

su creación (p. 81)

When the Computer Science Department at Stanford University obtained the first two or three Xerox Dolphins, John McCarthy asked me to do a simple benchmark test with him. We sat down, and he tried to remember the Takeuchi function, which had had wide circulation. Because it was simple and because there were many results for it in the literature, he felt that it would be a good initial test. Of course, John misremembered the function. But we did not realize it until I had gathered a great many numbers for it. Alas, we are stuck with this variant on Takeuchi.

y su definición (p. 82) que consiste en dado el programa

calcular el tiempo necesario para calcular (tak 18 12 6). En las páginas 82-91 Gabriel analiza y comenta los resultados obtenidos con la prueba TAK en distintas implementaciones de Lisp.

Además de TAK, en el capítulo 3 del libro se presenta algunas variantes (STAK, CTAK, TAKL y TAKR) y otras 15 pruebas de rendimiento. El conjunto de las 20 pruebas forman el Gabriel’s Lisp Benchmarking Suite.

Las prueba de rendimiento de Gabriel, juntos con otras pruebas de rendimiento constituyen el cl-bench (The Common-Lisp benchmarking suite) de Eric Marsden. En cl-bench, las pruebas de Gabriel están en el fichero gabriel.lisp y la prueba TAK es

Las pruebas de rendimiento de Common Lisp (cl-bench) trae guiones que permiten compararlas sobre distintas implementaciones de Lisp, entre las que se encuentran CLISP, CMUCL, ECL, GCL, LispWorks, PopLog y SBCL.

Los resultados de las pruebas de rendimiento con Common Lisp sobre 7 implementaciones de Lisp puede consultarse en Performance Benchmarks2.