3 ms·
I haven't seen any profiling of jQuery, but last I heard createElement('div') and appendChild was slower than innerHTML ="<div></div>".
by wmil 14y ago
I haven't seen any profiling of jQuery, but last I heard createElement('div') and appendChild was slower than innerHTML ="<div></div>".
- MatthewPhillips 14y agoThat used to be true, but nowadays it depends on the browser and the difference is a rounding error.
- dclowd9901 14y agoThen why wouldn't jquery just proxy it? It's not like the creators are shitty at JavaScript.
- dsego 14y agoThat's not true any more: http://jsperf.com/fragment-vs-appendchild-vs-innerhtml/8 http://jsperf.com/fragment-vs-appendchild-vs-innerhtml/8