Pins marked PWM capable on the pinout chart have hardware pwm Using analogWrite will use the appropriate timer and do hardware pwm if you use it on a pin that has one. You can also have it do software pwm on any pin, but obviously you want to stick with hardware pwm pins if possible, for the reasons you described in op
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Pins marked PWM capable on the pinout chart have hardware pwm Using analogWrite will use the appropriate timer and do hardware pwm if you use it on a pin that has one. You can also have it do software pwm on any pin, but obviously you want to stick with hardware pwm pins if possible, for the reasons you described in op