[Nyquist-users] Nyquist and multiple CPU's
Nyquist is a language for sound synthesis and music composition.
Brought to you by:
rbd
|
From: Roger D. <rb...@cs...> - 2006-01-08 17:50:49
|
Nyquist does not have any way to take advantage of multiple CPU's other than that audio output and file I/O might be handled on a separate processor automatically by the OS. In some ways, Nyquist is ideal for multiple CPU's because of its mainly functional language approach with minimal side-effects and shared state. All this exposes parallelism, e.g. every time you write (SIM (A) (B) ...) you are essentially saying that (A) and (B) and ... can run in parallel. Unfortunately, the lazy evaluation implementation and the hooks that (A) and (B) have into the shared Lisp heap and garbage collection would make a parallel implementation quite hairy (at least for me -- although Nyquist has settled down after a lot of use, I'm still finding obscure and rare little bugs in the single-threaded implementation!). The rationale for multiple processors would be speed. There may be other ways to speed up Nyquist. In particular, Nyquist control-rate signals can be interpolated with inline code at the expense of a larger executable. At one time, in-line interpolation was used everywhere, but I think I turned it off because certain unit generators were getting huge. Probably, some performance instrumentation could expose some areas for optimization. -Roger |