Parsing Int over Serial Slow
First off, I would recommend  strtok or even getline to parse comma delimited strings.

Secondly, I'm pretty sure no PWM is responsive enough for 1000 updates per second. But for other purposes this data rate might be needed.

To do this, build a custom cache that does the following:


Reads 1000 characters per go, if available, or less.
Parses on the go. From this set up callbacks to you PWM class, so that you can set PWM values while parsing.


Why this? I am not convinced that the sluggishness is due to the for parsing data. More likely, it's because you are processing every instruction as you get it.

1000 serial reads with 6 length for loops over strings (your case) will be significantly slower than 1 serial read and a 6k length for loop.