Yes. I have also done the same on CSS here but JS did not work as expected.

Experiment on all of them and you will see improvements. I saw a 66% ramp up in speed doing this.