[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to write fast Numerical Analysis code in CLISP?
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: How to write fast Numerical Analysis code in CLISP?
- From: pcolsen@super.org (Peter C Olsen)
- Date: Sun, 24 Apr 94 21:54:58 EDT
------- Start of forwarded message -------
I'm writing to ask for some ideas on how to write "acceptably fast"
numerical analytic code in either CLISP or AKCL. I would also be
interested in suggestions about other public-domain (or GPL-like) lisp
(or scheme) interpreters or compilers.
Here is some background. I've been tasked with performing some
exploratory time-series/signal-processing analysis on some very large
experimental datasets --- from about 10 million samples on up. My
first sets are 8-bit signed integers, although this may change later
on.
In the past, I've done this by plotting segments of data, finding
patterns, writing C-programs to find the patterns elsewhere, looking
at more segments, finding more patterns, etc. Sometimes I can use
tools like Ptolemy (a dsp packages from UCSB), but usually I wind up
having to write a suite of special-purpose C programs to do most of
the work --- a fact which diverts too much time from "analysis" to
"programming."
Now I'd like to redress that balance by turning to lisp, at least in
the preliminary stages when most of my programs are written to be used
once and thrown away. Unfortunately, my first few attempts in CLISP
yielded programs which took only minutes to write but HOURS to run ---
after I compiled them. I'm happy that I could design and code the
programs so quickly, but their run-time is so long that I can't use
them.
Now for some specific questions:
1. Is AKCL faster than CLISP? How about CMULISP? Scheme->C?
I need a PD/GPL-like lisp because I may want to run on several
platforms, from PCs to mainframes.
2. I have easy access to both an SGI-IRIS and a Sun SPARC-20.
Is one better than the other?
3. My data is collected as a large binary file, one point per
byte. I've been reading it directly, one byte at a time with
"read-byte", but only because I can't figure out how to do it better.
Is there an analog to the C function "fread" to allow block-reads?
Alternatively, would it be faster to translate the data to
ascii-character representation (thereby expanding it manyfold) and
read it that way?
I would appreciate any help. I like CLISP, and I want to use it for
some serious work, but I won't be able to unless I can make it run
much faster than I have been able to do so far.
Peter
Peter Olsen, n2ell, pcolsen@super.super.org ...!uunet!super!pcolsen
P.O. Box 410, Simpsonville, MD 21150-0410; 410-997-8584
"Engineering is the art of applying a professional knowledge of
mathematics and the physical sciences to improve the quality of life"