Lisp HUG Maillist Archive

Ooftah!

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


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


Re: Ooftah!

On Sat, 01 Aug 2015 20:18:54 +0100, David McClain  
<dbm@refined-audiometrics.com> wrote:

> I ascribe the productivity boost, not to a specific language, but rather  
> to a programming environment that is immediate, incremental, extensible,  
> and capable of endless in-situ redefinition. That sounds a lot like Lisp  
> to me. Forth was a start. For DSP work it’s like wearing bit-gloves to  
> feel the I/O ports and internal registers. Not the  
> end-of-the-10-foot-pole approach with conventional edit / compile /  
> debug sessions.


I could not agree with that more. In the last couple of years I had to  
move away from Lisp to more conventional developer tools (C# to be exact)  
for a simple reason that programming lisp does not really pay in Ireland  
where I live. I discovered that modern managed languages have come a long  
way in terms of usability and convenience, however iterative coding still  
appears to be rather uncommon for mainstream high performance programming  
tools.

Not once have I found myself thinking "I wish I could just run a couple of  
these statements like you do in lisp, rather than create a separate  
project and recompile it endlessly just to try something out".

-- 
Regards,

Yuri

http://www.disclosure.ie

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Ooftah!


> On Aug 1, 2015, at 2:47 PM, Yuri Davidovsky <yury.davidouski2@mail.dcu.ie> wrote:
> 
> Not once have I found myself thinking "I wish I could just run a couple of these statements like you do in lisp, rather than create a separate project and recompile it endlessly just to try something out".

The English idiom “not once have I” means “I have never”, which in this case seems to be the opposite of what you were saying in the rest of your message. Perhaps you meant to say “I have many times found myself thinking…”



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Ooftah!


> On Aug 1, 2015, at 6:21 PM, HARLEY JONES <jakib@me.com> wrote:
> 
> Maybe "More than once..." was intended.  Sounds like the common mid-thought restatement error we humans make when typing quickly.  
> I usually ignore😊

I think Laughing Water probably had it right. In Russian the idiom “not once” means “more than once”; in English it means “not at all.”

If you think about it literally, saying that something takes place “not once” just means that the number of times it takes place is not one. It could be zero, or it could be any other number of times. In English, the idiomatic meaning is that it never happens at all (and in fact, using the phrase “not once” in English emphasizes that the event has never happened, and that the fact is notable in some way).

In Russian, it seems, the other possible meaning is intended.

It subsequently occurred to me that there is also a less-used idiom in English that is very similar, but with the opposite meaning. If you say “not once have I thought of that”, you mean you have never thought of it. But if you say “not just once have I thought of it”, you mean that you have thought of it more than once. I imagine that could make things even more confusing for a non-native speaker.

TL;DR: idioms are confusing.




_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:33 UTC