Version 0.2.4: bigger, better, faster

    A lot of new and just good:



    Thanks to everyone who responded and somehow contributed to the development of the project. Be sure to find the time and lay out links to all the heroes.

    Now about the main [name=value]thing : it was possible to significantly improve performance and add support for selectors (in the singular) and :first-child, :last-child, etc(in the singular). The code was very refactored. In particular, all the simplest calls were transferred to associative arrays (for tag, class, and identifier).

    Now you can operate something like this:
    a.link [class = menu]
    div p: first-child
    body table form: only-child
    form input [type = checkbox]: checked


    The main function was divided into three - this significantly accelerated the overall speed. Apparently, when the method is called, its local version is created, the time for its creation is proportional to the complexity of the function (in fact, the number of elementary operations). Therefore, it turned out that small functions that call each other work faster than one large one.

    While support for full CSS3 is not planned (IMHO, now you can select almost any element). But I am considering such an opportunity.

    The list of all the improvements is quite large, you can see it in SVN: code.google.com/p/yeasss . From myself, I can add that in addition to the above tricks, the calls were also replacedarguments[]to ordinary named function parameters. Also, caching (as a fairly "weighty" operation with a large volume of the tree) was moved directly to the return value: now the assignment takes place in itself return.

    Download the latest versions:
    Full: yass.webo.in/yass.0.2.4.js
    Minimized: yass.webo.in/yass.0.2.4.min.js

    At the moment, the public in one form or another requires refinement of visual effects and functionality. But I personally have great doubts about which way to go in this direction: expanding the created object (wrapper) or adding properties to the global one window._. If anyone has any thoughts, please share.

    PS in order to somehow fix the acceleration had to slow down a lotSlickSpeed ​​tests on the site: for ordinary libraries they work extremely slowly, it is not recommended to select them when comparing speed.

    SlickSpeed ​​PPS tests themselves introduce a sufficient error in the calculations (as in quantum physics: it is impossible not to change it to measure a state), so I only consider them as indicative. In Opera, in particular, they give a lot of variation.

    Also popular now: