Are Nyquist Plug-ins slow? (Compiled vs Interpreted languages)

It is a common misconception that Audacity’s Nyquist plug-ins must be slow because they are written in an interpreted programming Language.

Nyquist is an interpreted language, meaning that it runs directly from the code rather than being compiled first, but the inner loops of many DSP functions are pre-compiled in highly optimised compiled C code. In many cases Nyquist plug-ins can perform faster than hand written C / C++ code.

However, it does depend on what the Nyquist code is doing. If the Nyquist code loops through audio sample by sample within an interpreted LISP loop, then the processing can be very slow. Thus, when designing and writing Nyquist plug-ins, it is highly advantageous to use built-in DSP functions rather than processing sample-wise in LISP.

Where built-in DSP functions are not available, then new DSP functions can be created as Objects which is likely to be significantly (perhaps 50 x) faster than a LISP loop, but still slower than using a pre-compiled C function.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.