[GEM-dev] Why is [hsv2rgb] implemented as an abstraction?

Claude Heiland-Allen claudiusmaximus at goto10.org
Tue Dec 11 12:03:56 CET 2007

Hi all,

Just wondering why hsv2rgb.pd (which is pretty incomprehensible) isn't a 
compiled external.  I had to write a C implementation because the Pd 
implementation was too slow.  Some rough benchmarks:

CPU: 1.6GHz Pentium-M
Patch: rather complex, with 25*1024 calls to hsv2rgb per second.
CPU-load as reported by load-meter.pd:
   hsv2rgb.pd     : 108%
   fast_hsv2rgb.c :  94%

Quite a difference.

Note that fast_hsv2rgb.c is coded really unsafely, doesn't check 
argument counts/types/ranges/etc - use at your own risk.



More information about the GEM-dev mailing list