Path: news.daimi.aau.dk!jacobse From: jacobse@daimi.aau.dk (Jacob Seligmann) Newsgroups: comp.lang.beta,comp.lang.lisp Subject: Re: Comparison: Beta - Lisp Date: 9 Sep 1994 11:03:38 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 73 Message-ID: <34pfea$6ee@belfort.daimi.aau.dk> References: <34n2qe$d74@nz12.rz.uni-karlsruhe.de> NNTP-Posting-Host: clematis.daimi.aau.dk Xref: news.daimi.aau.dk comp.lang.beta:15 comp.lang.lisp:13162 Lenny Gray (lenngray@netcom.com) wrote: > Bruno Haible (haible@ma2s2.mathematik.uni-karlsruhe.de) wrote: > > : ... > : some integer array hacking > : C 4.2 sec > : Mjolner 111 sec > : GCL 288 sec > : CLISP 415 sec > : (All timings on a 486/33.) > : ... Ouch! > Are these numbers right? I've seriously used GCL and CLISP myself and > had some arguments with a "true believer Lisper" who thought "Lisp _does_ > compete reasonably with C for numeric stuff", but I never bothered to do > the timing tests, and always assumed it wasn't this bad. Is it, really? I don't know what Bruno's "some integer array hacking" program does, but the performance ratios shown do not reflect my personal experience. For example, here's a very simple "some integer array hacking" program I wrote for the occasion: /* siah.c - some integer array hacking in C */ void main(void) { int a[10000], i, j; for (j=0; j<1000; j++) for (i=0; i<10000; i++) a[i] = i*4; } (* siah.bet - some integer array hacking in BETA *) ORIGIN '~beta/basiclib/v1.4/betaenv' --program:descriptor-- (# a: [10000]@integer; do (for j:1000 repeat (for i:a.range repeat i*4 -> a[i] for); for); #) And here's the run-times (486/66; BETA compiler v5.0(1); gcc v2.5.8): BETA 4.41 gcc 3.10 gcc -O6 1.24 In this case, the ratio between BETA and unoptimized C was 1.4, while the ratio between BETA and optimized C was 3.6. Bear in mind that the BETA compiler does not currently perform nearly as much optimization as gcc does. Also, the code generated by the BETA compiler contained an index check (which could have been removed, had the optimizer been smarter) at each assignment, while the C code obviously did not. > Also, I was interested in Beta until one minute ago, because of this. Hopefully, your interest has been reawakened. /Jacob Seligmann ------------------------------------------------------------------------ Mjolner Informatics ApS Phone: (+45) 86 20 20 00 ext. 2754 Science Park Aarhus Direct: (+45) 86 20 20 11 - 2754 Gustav Wieds Vej 10 Fax: (+45) 86 20 12 22 DK-8000 Aarhus C, Denmark Email: jacobse@mjolner.dk ------------------------------------------------------------------------ BETA is better ------------------------------------------------------------------------