Is checking speed between Javascript framework reliable?

It's quite interesting, this site conducts a speed test and compares all of these:

  • Puredom
  • jQuery 1.2.6
  • jQuery 1.3.2
  • Prototype 1.6.0.3
  • MooTools 1.2.2
  • qooxdoo 0.8.2
  • Dojo 1.2.3
  • Dojo 1.3.1
  • YUI 2.7.0

JavaScript speed mapping in JavaScript

The databases on this occasion look like the newest version of jquery is almost 2 times faster than the old version, however even the latest jquery showed IMO not so well

Request time:
 1. So, my question is, I'm new to javascript, do you think this test is pretty accurate?
 2. If it means that it even means anything in terms of performance or is it not even noticeable?

+3
5

, PureDom , . , : P

, , . , , - , .

+2

JavaScript . , : jQuery " " , , , . DOM , .

, . , .

+1

. .

, , "make" jquery 1.3.2 ( )

fireBug, , . .

makeBad makeGood. :

alt text
(: gyazo.com)

: .

"makeBad": function(){
        for(var i = 0; i<250; i++){
            $("<ul id='setid" + i + "' class='fromcode'></ul>")
                .append("<li>one</li><li>two</li><li>three</li>")
                .appendTo("body");
        }
        return $("ul.fromcode").length;
    },

. . , DOM. .

"makeGood": function(){
           var domBuilder = [];

          for(var i = 0; i<250; i++){
             domBuilder.push("<ul id='setid" + i + "' class='fromcode'>")
             domBuilder.push("<li>one</li><li>two</li><li>three</li>")
             domBuilder.push("</ul>")
          }

          $('#body').append( "<div>" + domBuilder.join() + "</div>");
          return $("ul.fromcode").length;
    },
+1

, .

  • node (set)
  • DOM.
  • .
  • .
  • AJAX .
  • IE ?
  • ? ?
  • , ,

, . .

+1

, , ( , ..), , libary - , itś .

-, , , , , , .

Finally, my personal opinion is that you just need to upgrade to the latest version of jQuery, for ease of use (CSS3 selectors) and a simple implementation of AJAX.

0
source

Source: https://habr.com/ru/post/1714708/


All Articles