Re: Ooftah!
Hi David,
how do you go about porting your DSP lisp code to C?
I tried it once, it was a nightmare.
On Sat, 01 Aug 2015 02:14:04 +0100, David McClain
<dbm@refined-audiometrics.com> wrote:
>
> Wow… Not to disparage Lispworks, which is a totally wonderful system,
> but I have lived long enough to witness the evolution of computing from
> the early days to now. And I have to say I am becoming totally impressed
> with the new state of compiler technology. I recoded a portion of my IIR
> and FIR filtering from Lisp to C. The new C compilers are smart enough
> to:
>
> (A) open code loops that are small enough (12-24 iterations counts as
> small enough), and
> (B) notice floating point idioms that can low-grade parallelized into
> SSE SIMD code
>
> Net result is that the overall speed of my audio scanning routines went
> from roughly 5x playback speed in Lisp, to about 40x playback speed with
> the critical filtering routines written in a Lisp-callable C library.
> Very impressive speedup, and totally widens the gap with Lisp again.
>
> Of course, thanks to Lisp in the first instance, I know that my C
> routines will compute correctly, having debugged the algorithms in the
> immediate and incremental mode of the Lisp session. I know from
> experience that trying to go directly to C would have cost the better
> part of a few days to get it correct. But having written and debugged
> everything in Lisp first, the C code took less than an hour. Getting the
> algorithms correct in Lisp took an afternoon. Can’t beat the combo of
> Lisp before C.
>
> Humorous side note: back in the early 1990’s when I first interviewed
> with the chair of the U of Arizona CompSci dept for entry into their
> grad program, I bragged that I had written more than 4M LOC in C/C++. (I
> used to write commercial C compilers and realtime Unix OS) His comment
> was: “You have my condolences…” Took me a few years to understand what
> he meant. But I totally get it now, and have gotten it for about the
> past 15 years with the help of Lisp.
>
> - DM
>
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html