Oct
18
2008

Peppy 0.1 beta release!

Today, I am releasing Peppy 0.1 beta! Download it here.

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). Take a look for yourselves, I have a profiling page set up here.

At 10k it is an ideal replacement for other excellent but bulkier libraries (whose feature sets span beyond DOM querying) when features additional to DOM querying are not needed in your web application. If you are designing your own JavaScript library or want to replace your existing libraries selector engine then Peppy is an ideal candidate.

Comments, both positive and negative, are most welcomed and desired. I want to improve this thing! Please take a look here.

Thanks.


1 (MajorLibraries - excluding Sizzle) : 4x faster in FF3, 6x faster in FF2,
8x faster in IE7, 3x faster in IE6, 3x faster in Opera 9, 4x faster in Safari 3

2 (results compared to Sizzle): 1.2x faster in FF3, 1.3x faster in FF2,
11.1x faster in IE7, 4.5x faster in IE6, 1x faster in Opera 9, 4x faster in Safari 3


Note : I have noticed that sometimes these results vary using Slickspeed, these result were all obtained running several times in each browser taking the avg for all runs. Also, tests were only run in windows Vista and XP.

Browsers used for testing: FireFox 3.0.3, FireFox 2.0.0.17, IE 7.0.6, IE 6.0.29, Opera 9.5.2, Safari 3.1.2

Written by jdonaghue in: CSS3, JavaScript, Peppy, Selectors | Tags: , , ,

74 Comments

  • [...] Donaghue has released Peppy, the first release of his CSS 3 compliant selector engine that runs independent of one particular [...]

    Pingback | October 21, 2008
  • Big fan of CSS selectors in prototype although knowing its not the best performer in the world - looking forward to giving this a test - keep it light and solid on your way to release 1.0 :-)

    Cheers!

    Comment | October 21, 2008
  • mmj

    Impressive.

    Its around 3.5k minified & gzipped.

    Comment | October 21, 2008
  • Mathiew

    I’m not quite sur i understand, i just plug this baby in and it will replace my selector engine from jquery? Is there a doc somewhere?

    Comment | October 21, 2008
  • JDD

    Fantastic work :)

    I noticed you enabled caching for IE, AFAIK there is no DOM event triggered to clear that cache (that IE supports).

    Comment | October 21, 2008
  • [...] Peppy! New CSS3 Selector Engine [...]

    Pingback | October 21, 2008
  • [...] Donaghue has released Peppy, the first release of his CSS 3 compliant selector engine that runs independent of one particular [...]

    Pingback | October 21, 2008
  • James Cook

    > Comments, both positive and negative, are most
    > welcomed and desired. I want to improve this thing!

    How _can_ you improve it? On Windows using Chrome, I got a score of 37ms (that’s across 40 tests!). Nearest competitor was Prototype 1.6.0.3 with a time of 112ms.

    Great work.

    Comment | October 21, 2008
  • Patrick

    Holy shit… Thats really fast.
    Great work, keep it up.

    Comment | October 21, 2008
  • I propose to test yet DomAssistant.

    Comment | October 21, 2008
  • Have you done any testing related to caching and ajaxy DOM updates? (see John Resig’s comments here: http://ajaxian.com/archives/peppy-css3-selector-engine)

    Comment | October 21, 2008
  • dave.trudes

    Great job, dudes.
    Peppy also does his job in IE 5.5 (Found everything, Final time: 156 ms vs. Ext 2.2: 526 ms)

    really great!

    Comment | October 21, 2008
  • So, is it released under MIT license? I am interested in becoming part of the team to contribute into peppy as a open source contributor. Do email me to let me know if there is any way that I can contribute to it.

    Comment | October 21, 2008
  • Do you have a license? MIT or compatible would be nice if I were to integrate it into Chiron (modulesjs.com), my module system project.

    Comment | October 21, 2008
  • James “Peppy” selectors…

    I have just finished reading through peppy.js , a “lightning fast CSS 3 compliant selector engine with no external library dependencies”. Created by James Donaghue.
    What i, really, like about this, is that other people competes with the nin…

    Trackback | October 21, 2008
  • anonymous

    What is the license of Peppy?

    Comment | October 21, 2008
  • Nice work james, do you have some usage examples?

    Also, what license will Peppy be under?

    Comment | October 21, 2008
  • [...] 사이트에서 PEPPY라는 CSS3 SELECTOR ENGINE 라이브러리가 나왔다는 글을 보았습니다. Peppy: New CSS 3 [...]

    Pingback | October 21, 2008
  • Very impressive!!! Loved it :P
    it is only missing documentation :D but you can alway mention selector engine it in a single line ;)

    Comment | October 21, 2008
  • [...] Donaghue has released Peppy, the first release of his CSS 3 compliant selector engine that runs independent of one particular [...]

    Pingback | October 21, 2008
  • [...] Так что на данный момент остается только, с замиранием дыхания, ждать. Пост о первом бета-релизе peppy [...]

    Pingback | October 22, 2008
  • Just did my own profiling and I’m impressed! Also, Sizzle is at least 55% faster in Opera, but it throws 4 exceptions in IE so I say Peppy wins, hands down. At this point some documentation or a guide would be nice.

    Comment | October 22, 2008
  • [...] Demo | More info…. [...]

    Pingback | October 22, 2008
  • A short user guide would be nice to have!

    Comment | October 22, 2008
  • Sam

    There are tests without caching:
    http://lusever.ru/css-selectors/?Sizzle_21-10-08/Peppy_0-1

    Not so promising. Keep moving ;)

    Comment | October 22, 2008
  • [...] Donaghue has released Peppy, the first release of his CSS 3 compliant selector engine that runs independent of one particular [...]

    Pingback | October 22, 2008
  • Oscar C

    Hi! Cool, nice effort. On my machine however ’sizzle’ came in first at 50ms, peppy at 54ms.

    Not that it matters not much to me. Haven’t heard of sizzle before, but I’ve been so in to coding lately I haven’t even kept up with the news.

    Comment | October 22, 2008
  • Oscar C

    Oh, sorry, forgot: Ran it in FF 3.01 in Vista (compat-testing browsers, keeping me from dev’ing in ubuntu the last days, boohoo).

    Comment | October 22, 2008
  • WOW! Speedy :)

    Comment | October 22, 2008
  • Impressive work. Congratulations! But I’d be even more interested if I could use Peppy inside other libraries, like say, dojo, as the selector engine. Are you working in something like that?

    Comment | October 22, 2008
  • [...] Donaghue has just released Peppy, a very fast CSS3 compliant JavaScript selector engine. The author claims that it is … [...]

    Pingback | October 22, 2008
  • Nice time,

    When get peoples some dokumentation about library?

    Comment | October 23, 2008
  • [...] Donaghue has just released Peppy, a very fast CSS3 compliant JavaScript selector engine. The author claims that it is … [...]

    Pingback | October 23, 2008
  • Jerome

    How do I use this with Prototype?
    Do I just drop the file in after?

    Comment | October 23, 2008
  • Have you changed the code from when you first posted it? Is it still 0.1?

    Keep us posted as you improve it.

    Comment | October 23, 2008
  • [...] lieblings Blogs, ajaxian.com, ein Beitrag über eine neue Selector Engine geschrieben worden. Peppy ist ihr name. Und sie sollte schneller sein als Sizzle von John [...]

    Pingback | October 24, 2008
  • Hi James! As im always eager to learn more, would you mind taking the time to make a richly commented version of the script? I asked that on my blog, i think you missed that. :) Passing on some knowledge to the learning generation is a great thing. :) Thanks.

    Comment | October 24, 2008
  • jdonaghue

    I just added a new post. I hope that answers all of the questions that came up here in the comments. If not please let me know.

    Comment | October 24, 2008
  • [...] so much work going in to selector engines right now (has been for a few years now, but the bar keeps on [...]

    Pingback | October 27, 2008
  • [...] James Donaghue » Peppy 0.1 beta release! Peppy is a lightning fast CSS 3 compliant selector engine with no external library dependencies. Peppy can be used along side other libraries seamlessly. (tags: jamesdonaghue.com 2008 mes9 dia27 CSS selectors CSS3 JavaScript) [...]

    Pingback | October 28, 2008
  • Sizzle was the fastest for me on your slicktest.

    Comment | October 30, 2008
  • Ben

    With the following html pattern:
    [div class=test][div class=test2][/div][/div]
    Times 200.

    I get 200 results found in FF (goes ok in IE) on the following cssQuery pattern: div[class=test]

    Comment | November 1, 2008
  • [...] - выборка элементов DOM по CSS3 селекторамJames Donaghue создал библиотеку Peppy для выборки элементов DOM, использую селекторы CSS3. [...]

    Pingback | November 2, 2008
  • [...] Peppy 0.1 beta release! A CSS3 compliant selector engine [...]

    Pingback | November 3, 2008
  • [...] arreglar esto James Donaghue ha publicado, en versión Beta, un motor para hacer estas selecciones que se caracteríza por dedicarse solamente a eso y hacerlo muy rápidamente y a través de un JS [...]

    Pingback | November 4, 2008
  • A port of Peppy is now the default selector engine for Chiron. It looks something like this:

    include(’select.js’);
    include(’browser.js’);
    select(’#buffer’).forEach(setOpacity(.5));

    You can try it out with the console:
    http://modulesjs.com/nightly/build/run.html

    Here’s the source and the object code, built every evening:

    http://modulesjs.com/nightly/src/select.js
    http://modulesjs.com/nightly/build/select.js
    https://cixar.com/tracs/javascript/browser/trunk/src/select.js

    Comment | November 24, 2008
  • jdonaghue

    This is great new Kris! Thanks very much for choosing Peppy.

    Comment | November 24, 2008
  • Jayaprakash

    Hi James,

    Have you tested peppy with DomQuery (http://ajaxian.com/archives/domquery-a-lightweight-css-selector-basic-xpath-implementation) to find which one is quicker?

    Nice work man and I am interested in comparing peppy with DomQuery as I’ve mentioned.

    It would be nice if you post your views about this.

    Thanks

    JP

    Comment | November 28, 2008
  • Can be made faster with using direct document.getElementById or document.getElementsByTagName in proper cases.

    Also it doesn’t return sets of elements — only the first occurence.

    Comment | December 2, 2008
  • Hi, it’s me again. I’ve created version (with CSS1 support only) that is 2-10 times faster. Main ideas are (dirty) implemented here:
    http://webo.in/tests/yet-another-css-selector/
    feel free to use any of them (pre-check of popular selectors, caching, fast cycles, fast replaces, limited calls, etc).

    Comment | December 2, 2008
  • maggg

    Note, that “0x faster in Opera 9” means “It doesn’t work in Opera”. The correct variant is “1x faster in Opera 9”, than means “It works with the same speed in Opera”.

    Comment | December 4, 2008
  • jdonaghue

    @maggg: good catch - thanks

    Comment | December 6, 2008
  • Огромное спасибо за потрясающие идеи!!! Буду следить за блогом, много всего интересного. А мой блог о науке, надеюсь, тоже понравится ;)

    Comment | December 8, 2008
  • напишу и у себя в блоге

    Comment | December 11, 2008
  • òåìà î÷åíü àêòóàëüíà ñåé÷àñ, íå òàêë ëè?

    Comment | December 11, 2008
  • Bob

    óäèâèëî, ÷òî ïðî÷èòàë îá ýòîì èìåííî ñåé÷àñ

    Comment | December 12, 2008
  • Add to my Bookmarks :)

    Comment | December 12, 2008
  • кто хочет меняться ссылками, пишите

    Comment | December 13, 2008
  • я люблю все ваши слова..

    Comment | December 14, 2008
  • Bob

    èíòåðåñíî)) ÿ êàê ðàç ïîñìîòðåë ñåé÷àñ 3+2, òàê íàñìåÿëñÿ)) âñåì ðåêîìåíäóþ âñïîìíèòü

    Comment | December 16, 2008
  • ÷òî æå òàì ñìåøíîãî?

    Comment | December 16, 2008
  • sympathetic location! fount done!

    Comment | December 23, 2008
  • Интересно! По-настоящему супер написано. :)

    Comment | December 23, 2008
  • alexei

    Take a look at http://yass.webo.in. It is the fastest JS CSS selector I’v seen

    Comment | December 25, 2008
  • Любопытно написано, но как говорится, для точного представления нужно минимум три источника :)

    Comment | December 26, 2008
  • У меня скоро в закладках место закончится, но я рад добавлять с вашего блога и далее ссылочки на интересные темы!

    Comment | December 26, 2008
  • За статью благодарю, все по делу, достаточно много кто это применяет на практике

    Comment | December 28, 2008
  • [...] Donaghue has just released Peppy, a very fast CSS3 compliant JavaScript selector engine. The author claims that it is … [...]

    Pingback | December 29, 2008
  • hello…

    super!…

    Trackback | January 2, 2009
  • greatings…

    thanks…

    Trackback | January 2, 2009
  • Thanks for all you ideas! I sure will be back to visit your site again so i can learn more.

    Comment | January 4, 2009
  • Hi! A Great Post. I was just playing with blogs. i was really excited.

    Comment | January 4, 2009
  • Keep on blogging! :)

    Comment | January 4, 2009
  • Да, такой блог однозначно надо раскручивать как только можно - что б как можно больше читателей о нем узнали! :)

    Comment | January 5, 2009

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes