The jquery one will be doing a lot of extra useless inefficient grunt work
Such as?
Such as?
$ isn't just a syntax layer on top of querySelectorAll. When you do $('p'), it first queries the DOM for everything that matches that selector, then it creates new jQuery objects to wrap each of the returned nodes as well as creating a jQuery object to contain them.
If all you're doing is setting the innerHTML of these objects, it's a non-trivial overhead.
[1] https://github.com/jquery/jquery/blob/master/src/manipulatio...