[PD] expr and expr(~) vs individual operators

Jamie Bullock jamie at postlude.co.uk
Mon Jan 17 12:10:12 CET 2005


Yes,

Thanks to all who replied. I have been using the expr family a lot for
this very reason, and just wanted to check I wasn't creating overhead.
Seems like if I am, it is negligible and worth the trade-off.

Jamie


On Sun, 2005-01-16 at 22:00, Frank Barknecht wrote:
> Hallo,
> Michal Seta hat gesagt: // Michal Seta wrote:
> 
> > "Roman Haefeli" <reduzierer at yahoo.de> writes:
> > 
> > > i remember that someone from the list wrote that using [expr] or [expr~]
> > > consumes more cpu than doing the equivalent with 'conventional' objs.
> > > but i can't remember the reason and how much the difference is. maybe
> > > you'll find it by searching the archive.
> > 
> > I remember that a long time ago, on a Pentium 566Mhz I found that the
> > combination of [expr~] and regular pd operators was the most efficient
> > solution to complex equasions.  YMMV, but I think that only
> > experimentation will give the best results.  On my AthlonXP 2400 the
> > difference between the 2 approaches was negligible (in that
> > particular case).
> 
> I didn't do any extensive benchmarking, but I suppose, that the
> difference will not really matter, and if it does, only benchmarking
> your actual patches will give the solution.
> 
> But in any way, the expr-family of objects is much faster when it
> comes to do the patching itself and can be a major time saver. I would
> encourage anyone to use them a lot. Something like: 
> 
> expr if ( $f1 > 0, 1/$f1, pow($f1, 2) )
> 
> might look a bit scary at first, but if you do this as single objects,
> it is really longwinded. 
> 
> Ciao





More information about the Pd-list mailing list