This paper analyzes the FANNKUCH benchmark, that was discussed on the comp.lang.lisp internet newsgroup during September 1994, and reviews the performance issues underlying it. This benchmark involves operations on integers and vectors of integers so one might expect that Lisp and C versions could have comparable performance. However, the original benchmark suggested that the Lisp version was at least 10 times slower than the C version. While this version appeared to be optimized, several important improvements are possible.The improved version is between 24 and 116 percent slower than C when run on several Lisp implementations. This can be accounted for by differences in the quality of the compiled code of the inner loops of the benchmark, not by an essential difference between the two languages. The GNU C compiler, gcc, produces a loop with a larger overall size (footprint) but with a smaller loop body than the current Lisp compilers. In principle, a Lisp compiler can produce these loops with the same or fewer number of instructions.It is easy to write benchmarks that make Lisp appear slower than C. However, as with any highly tuned benchmark, a small change can have a profound effect on performance. even in C. For example, replacing / 2 by ≫1 makes a 40% improvement. Also changing the representation of integers and arrays of integers among C's built in types varies the performance by 80%.
Description
Performing Lisp analysis of the FANNKUCH benchmark
%0 Journal Article
%1 Fannkuch
%A Anderson, Kenneth R.
%A Rettig, Duane
%C New York, NY, USA
%D 1994
%I ACM
%J SIGPLAN Lisp Pointers
%K Benchmarks Performance
%N 4
%P 2--12
%R http://doi.acm.org/10.1145/382109.382124
%T Performing Lisp analysis of the FANNKUCH benchmark
%U http://portal.acm.org/citation.cfm?id=382109.382124
%V VII
%X This paper analyzes the FANNKUCH benchmark, that was discussed on the comp.lang.lisp internet newsgroup during September 1994, and reviews the performance issues underlying it. This benchmark involves operations on integers and vectors of integers so one might expect that Lisp and C versions could have comparable performance. However, the original benchmark suggested that the Lisp version was at least 10 times slower than the C version. While this version appeared to be optimized, several important improvements are possible.The improved version is between 24 and 116 percent slower than C when run on several Lisp implementations. This can be accounted for by differences in the quality of the compiled code of the inner loops of the benchmark, not by an essential difference between the two languages. The GNU C compiler, gcc, produces a loop with a larger overall size (footprint) but with a smaller loop body than the current Lisp compilers. In principle, a Lisp compiler can produce these loops with the same or fewer number of instructions.It is easy to write benchmarks that make Lisp appear slower than C. However, as with any highly tuned benchmark, a small change can have a profound effect on performance. even in C. For example, replacing / 2 by ≫1 makes a 40% improvement. Also changing the representation of integers and arrays of integers among C's built in types varies the performance by 80%.
@article{Fannkuch,
abstract = {This paper analyzes the FANNKUCH benchmark, that was discussed on the comp.lang.lisp internet newsgroup during September 1994, and reviews the performance issues underlying it. This benchmark involves operations on integers and vectors of integers so one might expect that Lisp and C versions could have comparable performance. However, the original benchmark suggested that the Lisp version was at least 10 times slower than the C version. While this version appeared to be optimized, several important improvements are possible.The improved version is between 24 and 116 percent slower than C when run on several Lisp implementations. This can be accounted for by differences in the quality of the compiled code of the inner loops of the benchmark, not by an essential difference between the two languages. The GNU C compiler, gcc, produces a loop with a larger overall size (footprint) but with a smaller loop body than the current Lisp compilers. In principle, a Lisp compiler can produce these loops with the same or fewer number of instructions.It is easy to write benchmarks that make Lisp appear slower than C. However, as with any highly tuned benchmark, a small change can have a profound effect on performance. even in C. For example, replacing / 2 by ≫1 makes a 40% improvement. Also changing the representation of integers and arrays of integers among C's built in types varies the performance by 80%.},
added-at = {2009-03-02T14:34:50.000+0100},
address = {New York, NY, USA},
author = {Anderson, Kenneth R. and Rettig, Duane},
biburl = {https://www.bibsonomy.org/bibtex/2cda34d472a011e77c33a830869cf336c/gron},
description = {Performing Lisp analysis of the FANNKUCH benchmark},
doi = {http://doi.acm.org/10.1145/382109.382124},
interhash = {52f04122b6119ff8c6762788dbadc10a},
intrahash = {cda34d472a011e77c33a830869cf336c},
issn = {1045-3563},
journal = {SIGPLAN Lisp Pointers},
keywords = {Benchmarks Performance},
number = 4,
pages = {2--12},
publisher = {ACM},
timestamp = {2009-03-02T14:34:50.000+0100},
title = {Performing Lisp analysis of the FANNKUCH benchmark},
url = {http://portal.acm.org/citation.cfm?id=382109.382124},
volume = {VII},
year = 1994
}