[PD-dev] symbol comparison vs strcmp()
IOhannes m zmölnig
zmoelnig at iem.at
Thu Mar 11 19:26:51 CET 2021
Pd uses a symbol-table for practically all of its string handling.
the main purpose of the the symbol table is, as i understand it, to make
string comparison super-fast (as there's no need to compare each
character but just a simple address).
now, looking at the code i see quite a number of places¹ where something
like this is used:
> strcmp(atom_getsymbolarg(i, argc, argv)->s_name, refstring);
what is the reason for this?
is it just out of habit (because in all the other projects you usually
or because this is an attempt to not pollute the symbol table needlessly?
or am i missing something?
or should they just be replaced with symbol comparisions?
¹ i've counted about 135 of such uses (automatically; so I certainly
missed a few)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 840 bytes
Desc: OpenPGP digital signature
More information about the Pd-dev