Hacker News new | ask | show | jobs
by bumblebird 6029 days ago
>> "The jQuery example, from the beginning, was creating DOM elements from HTML strings, while RightJS was wrapping the document.createElement API. This is not the same thing and you cannot learn anything from comparing apples to oranges."

What you can learn though, is that using the built in DOM methods, or wrapping createElement if you need to, is far faster than using some other abstraction from the DOM.

2 comments

I would assume that adding a layer of abstraction would be slower than native calls, regardless of the language.
Actually, using HTML strings is quite a bit faster than using the DOM methods in many browsers. Strange but true. (I guess it's because the extra time spent parsing the string is trivial compared to the extra time you spend mucking around in the JS interpreter when you use the DOM.)