[chuck-users] benchmarking UGens

Tom Lieber lieber at princeton.edu
Tue Mar 10 23:24:40 EDT 2009

2009/3/10 Kassen <signal.automatique at gmail.com>:
> As for Gain & Pan2; you are quite right.  Here we could say that Gain is
> more or less like the "base cost" of all UGens. Still; a modest little Gain
> is capable of adding, multiplying and so on. Clearly Pan2 needs it's own
> code but it's not clear to me yet why that code has to be so much more
> expensive than just two Gains. One explanation would be that the base cost
> of a Gain doesn't account for everything; a Gain set to multiply might be
> more expensive than a plain one or maybe stereo adds cost. I suspect there
> are hidden issues that we haven't evaluated yet.

I'm pretty sure there being no Gain-specific functionality is all
there is to it. Can you find a UGen that doesn't support "3 => u.op"?
I think "Gain" is just the most generic UGen possible.

(I should really go verify it in code, but I'm a little busy tonight.)
(Same reason I haven't tried my hand at the ChucK benchmarks.)
(I'll probably forget about both of these by the time I'm free, though. ;p)

> At any rate this shows that the base-costs of adding a UGen at all are there
> and are quite signifficant compared to the cost a full UGen. IMHO this
> pleads for the "blob" project.

Or an optimizing ChucK compiler! (heh, heh, any takers?)

Tom Lieber

More information about the chuck-users mailing list