Re: [q-lang-users] Re: Newbie questions and comments
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2005-04-15 09:29:38
|
Tim Haynes wrote: > Random datapoint: on my machine it took Q 28mins to do the takfp test > listed there. Did you use integer or floating point arithmetic? Here are two runs from my machine: ==> tak 30 20 10; stats 11 485 secs, 278308692 reductions, 133 cells ==> tak 30.0 20.0 10.0; stats 11.0 431 secs, 278308692 reductions, 133 cells I'd guess that with machine integers the performance would be closer to that of Python. Not that this is a real option, since Q's integers are always bigints. > (However, at least it did it in constant memory; my obvious implementation > in Perl took 7mins but blew to 1.4Gb VSZ...) Languages without tail call elimination suck. ;-) Q uses only 133 expression cells (~3KB), so the memory requirements would be just what the interpreter needs for global data anyway... Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikwissenschaft.uni-mainz.de/~ag |