- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Sat, 07 Dec 2013 17:56:44 -0500
- To: public-webapps@w3.org
On 12/7/13 5:37 PM, Domenic Denicola wrote: > $(document.querySelector(".my-slider")).slider("option", "disabled", false); > > instead of > > document.querySelector(".my-slider").disabled = false; I should note that the latter is _much_ more likely to be fast, for people who care about that sort of thin. In particular, it's much more likely to be simple straight line code that operates on monomorphic types than the former; the former is more likely to end up in some sort of generic dispatch framework that ends up with polymorphic code to boot. So it's much more likely that a JIT can usefully inline the latter and compile it to just a few instructions than it is that it can do that with the former... -Boris
Received on Saturday, 7 December 2013 22:57:13 UTC