I'd guess #2 would be fastest as well. AFAIK the only significance of
#3 vs #2 would be that you are making a change further down the
document, therefore there's less to re-flow. Would be interesting to
know if there's is any out-of-viewport optimization in any of the
browsers though.
As for how to measure it, just take a timestamp before you do the
change, change it and take another afterwards - js and DOM operations
all share the same thread and block one-another so you'll get a
reading that is accurate - as far as any timing with javascript is
accurate:
http://ajaxian.com/archives/timing-in-javascript-and-browsers-cant-be-trusted
..Average it over enough samples and you should get your answer.
/Sam