[PD] [hid] users poll

Mathieu Bouchard matju at artengine.ca
Wed Jun 15 19:23:55 CEST 2005


On Wed, 15 Jun 2005, Hans-Christoph Steiner wrote:
> So now that there are some people using [hid], I want to ask a question 
> about how its working for people, specifically about the use of symbols 
> rather than integers for the event naming scheme (i.e. "abs" vs. "2"; 
> "rel_rx" vs. "5", etc.).  It definitely takes more CPU power to use 
> symbols, so I have two questions:
> Do you notice the extra CPU load from [hid]?
> Do you find the symbolic names useful, versus numbers?

I think that as long as integers still can be used, there is no problem 
with supporting symbols. I mean I've seen cases where the enforcing of 
symbols means having to use [sprintf] all over the place in a 
less-than-elegant way.

Comparing symbols is fast. [route foo bar baz] is just as fast as [route 
55 242 666]. This is because gensym() ensures that if two symbols refer to 
the same text then they necessarily have the same pointer value. This is 
a standard: LISP/Smalltalk/Ruby/etc all do it the same.

Actually comparing symbols is much faster than comparing floats, if you 
run Pd on a 386 or on a PDA.

Comparing strings would be slower but Pd doesn't have strings.



(I haven't used [hid] yet though.)

,-o--------o--------o--------o-. ,---. irc.freenode.net #dataflow |
| The Diagram is the Program tm| | ,-o-------------o--------------o-.
`-o------------o-------------o-' | | Mathieu Bouchard (Montréal QC) |
   | téléphone:+1.514.383.3801`---' `-o-- http://artengine.ca/matju -'


More information about the Pd-list mailing list