WebAppers

/ best free open source web resources /

Shopify

Peppy – Super Fast CSS 3 Compliant Selector Engine

Posted · Category: BSD License, Framework

Peppy is a lightning fast CSS 3 compliant selector engine with no external library dependencies. Peppy can be used along side other libraries seamlessly.

As it stands now Peppy is faster1 than all other major JavaScript libraries with DOM querying capabilities (Prototype 1.6.0.3, JQuery 1.2.6, MooTools 1.2.1, EXT 2.2, DoJo 1.2.0, YUI 2.6.0). It is faster2 than Sizzle by John Resig and it also is cross browser (IE included). You can take a look for yourselves by using SlickSpeed Selectors Test and download Peppy here.

If you are designing your own JavaScript library or want to replace your existing libraries selector engine then Peppy is an ideal candidate.

Requirements: -
Demo: http://jamesdonaghue.com/static/peppy/
License: FreeBSD License

8 Comments
  • http://kim.steinhaug.com Kim Steinhaug

    It’s very much faster than Prototype which I am using in all systems, so I should incorporate this one for sure! On the benchmark though, on my Vista box ExtJS is by far the fastest one – however this is the commercial one so I would expect it being best.

    However 6x prototype is a real enhancement overall!

    Nice tip, will download!

  • Shaun

    Be careful using Peppy. It works by storing the page in a variable first. If you make any changes to your page on the fly with JavaScript, Peppy won’t see them.

    I recommend Sizzle by John Resig. (http://github.com/jeresig/sizzle/tree/master).

  • http://jimneath.org Jim Neath

    Also, parts of Peppy have been copied straight from Sizzle.

    I’d just use Sizzle.

  • http://kim.steinhaug.com/ Kim Steinhaug

    Thanks for this information, I will go for Sizzle.

  • http://jamesdonaghue.com James Donaghue

    @Jim Neath: Peppy has not copied parts from sizzle, nor has it copied parts from any other source. It was written by me from the ground up. I worked very hard on Peppy and to propagate the message that I have copied code is not fair and is not justified. If you actually take a look at the source code you can see that it is dramatically different from Sizzle or any other library out there.

    @Shaun: Peppy does use caching (as does Sizzle), however in browsers that do not support DOM mutation events this is turned off. Browsers that do support DOM mutation events caching is cleared as soon as the DOM changes so this is not an issue.

  • John

    There were more fast and right libraries from Peppy and Sizzle.
    * uupaa-selector (IE 6+, Fx2+)
    http://pigs.sourceforge.jp/blog/200901090125/uupaa-teco.js
    * ksk (IE 5+, Fx1+)
    http://kquery.if.land.to/ksk.js

  • http://br3w.com.br Roger Skywalker

    Greate. Billions of years ago I used to use my own css selector. Then, I replaced it by the css selector of some Simon Willison (Does anybody know him?). His selector is the fastest i ever saw, but with limitations and some bugs.

    Now, the time has come to start using Peppy. Thanks James ;)

  • Delan Ahmad

    Exactly! I used to just use a document.getElementById wrapper until I discovered Binny V A’s getElementsBySelector (improved version of Simon Willison’s) – until I realized I needed more powerful CSS3 selection. Then I found Peppy. It’s great!

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons