[PD] pduino rewrite

Roman Haefeli reduzent at gmail.com
Fri Sep 16 11:59:33 CEST 2011


On Fri, 2011-09-16 at 11:32 +0200, Roman Haefeli wrote:
> On Fri, 2011-09-16 at 05:57 +0200, Ingo wrote:
> > > The [change -1] is a great idea, I just committed that to bytemask.pd
> > > and debytemask.pd.  But the [pd resolve-bits_0-7] abstractions seem
> > > quite labor-intensive, but they work.  I think it would work better to
> > > use multiple instances of [debytemask].
> > > 
> > > .hc
> > 
> > Not sure what you mean by "labor-intensive", Hans. Are you talking about
> > manually changing 8 numbers per object (which took me less than 1 minute for
> > 56 channels) or are you talking about cpu processing?
> > 
> > Which leads me to the next question: is the Boolean approach using [& 4] and
> > [>> 2] more cpu friendly than using [mod 8] and [div 4]?
> 
> I was told that it is. Bit shifting and bit mask matching is supposed to
> be faster than integer division and modulo with an arbitrary (inclusive
> non-power-of-two integers). 

It turns out that difference is not significant. On my box, processing
1000000 floats takes ~160ms ([mod],[div]) vs. ~150 ([&],[>>]). Probably
all the message parsing overhead is consuming more than the actual
computation of the numbers.

Roman




More information about the Pd-list mailing list