Speeding up $.className.* ?

Speeding up $.className.* ?


It seems possible to ever so slightly optimize $.className.add(),
$.className.remove(), and $.className.has() by adding an up-front
check to see if the `className` parameter is a non-falsy value (not
just `undefined`).
This would avoid triggering costly processing such as envoking $.each
loops, .splits() and functions, and even possibly document reflow
(when re-assigning unchanged values to an element).
One could also check for the existence of element.className before
attempting to remove any classNames.
It seems like a place ripe for optimization.
--
Már.