Posts

Showing posts with the label TaskSpeed

TaskSpeed - The Real Cheat

Inline "make" test that no library should " outperform " - this is a reply to this post which has few good points, we all know about browsers VS SunSpider, and other tests, but it falls down when it criticizes the TaskSpeed aim which is completely different. "make": function(){ for(var el = document.createElement("div"), outperform_this = [], i = 0, length = 250; i < length; ++i ) outperform_this[i] = '<ul class="fromcode" id="setid' + i + '"><li>one</li><li>two</li><li>three</li></ul>' ; el.innerHTML = outperform_this.join(""); for(var i = 0, fragment = document.createDocumentFragment(), childNodes = el.childNodes; i < length; ++i) fragment.appendChild(childNodes[0]) ; document.body.appendChild(fragment); if(document.querySelectorAll) return document.querySelectorAll(...

WebReflection PureDom baseline for TaskSpeed

I just had a quick and nice chat with Peter E Higgins and I am proud to announce that my PureDom test has been integrated into TaskSpeed test suite. Why PureDom We all know how many benefits libraries give us on daily basis about Web 2.0 supersonic development, but as both libraries author and users, we should pay attention. Web Developers: sometime we delegate to our cool library some simple task which could be easily implemented manually. If performances are a problem we should use libraries only when and if necessary. There are a lot of best practices for each library and all we need to do is to read these practices to be sure our way to code is of course elegant, but not silly. // this is silly $("#items li.selected").each(function(){ $(this).css("color", "red"); $(this).css("background", "blue"); $(this).width($(this).parent().width()); }); // ... while this makes sense $("#items li.selected").each(function...