From 9c029f1687d87abd52dca1cc2a5ecdb01895d6de Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 12 Jan 2009 18:22:44 +0000 Subject: [PATCH] Updated the benchmarking utility to use the Yahoo homepage and a bunch of new selectors. --- build/speed/benchmarker.js | 53 +++-- build/speed/index.html | 445 +------------------------------------ 2 files changed, 41 insertions(+), 457 deletions(-) diff --git a/build/speed/benchmarker.js b/build/speed/benchmarker.js index b2c05a14..bfcc16ed 100755 --- a/build/speed/benchmarker.js +++ b/build/speed/benchmarker.js @@ -1,19 +1,42 @@ jQuery.benchmarker.tests = [ - "*", - "body", "body div", "div", - "div div div", "div div", ".dialog", "div.dialog", "div .dialog", - "#speech5", "div#speech5", "div #speech5", "div > div", "div.scene div.dialog", - "div#scene1.scene div.dialog div.direction", "#scene1 #speech1", "body > div.dialog div div#speech5", - "div:not(#speech5)", "div:not(.dialog)", - "div:nth-child(even)", "div:nth-child(odd)", - "div:nth-child(1)", "div:nth-child(2n)", - "div:nth-child(2n+3)", "div:first-child", - "div:last-child", "div:only-child", - "div:contains(CELIA)", - "div ~ div", "div + div", - "div[class]", "div[class=dialog]", "div[class!=dialog]", - "div[class^=dialog]", "div[class$=dialog]", "div[class*=dialog]" - ] + // Selectors from: + // http://ejohn.org/blog/selectors-that-people-actually-use/ + /* + // For Amazon.com + "#navAmazonLogo", "#navSwmSkedPop", + ".navbar", ".navGreeting", + "div", "table", + "img.navCrossshopTabCap", "span.navGreeting", + "#navbar table", "#navidWelcomeMsg span", + "div#navbar", "ul#navAmazonLogo", + "#navAmazonLogo .navAmazonLogoGatewayPanel", "#navidWelcomeMsg .navGreeting", + ".navbar .navAmazonLogoGatewayPanel", ".navbar .navGreeting", + "*", + "#navAmazonLogo li.navAmazonLogoGatewayPanel", "#navidWelcomeMsg span.navGreeting", + "a[name=top]", "form[name=site-search]", + ".navbar li", ".navbar span", + "[name=top]", "[name=site-search]", + "ul li", "a img", + "#navbar #navidWelcomeMsg", "#navbar #navSwmDWPop", + "#navbar ul li", "#navbar a img" + */ + // For Yahoo.com + "#page", "#masthead", "#mastheadhd", + ".mastheadbd", ".first", ".on", + "div", "li", "a", + "div.mastheadbd", "li.first", "li.on", + "#page div", "#dtba span", + "div#page", "div#masthead", + "#page .mastheadbd", "#page .first", + ".outer_search_container .search_container", ".searchbox_container .inputtext", + "*", + "#page div.mastheadbd", "#page li.first", + "input[name=p]", "a[name=marketplace]", + ".outer_search_container div", ".searchbox_container span", + "[name=p]", "[name=marketplace]", + "ul li", "form input", + "#page #e2econtent", "#page #e2e" + ]; jQuery.fn.benchmark = function() { this.each(function() { diff --git a/build/speed/index.html b/build/speed/index.html index 4eac5563..717ca731 100755 --- a/build/speed/index.html +++ b/build/speed/index.html @@ -1,7 +1,7 @@ - + Speed Test @@ -62,450 +62,11 @@ -
-

As You Like It

-
- by William Shakespeare - -
-
-

ACT I, SCENE III. A room in the palace.

-
-
Enter CELIA and ROSALIND
- -
- -
CELIA
- -
-
Why, cousin! why, Rosalind! Cupid have mercy! not a word?
-
- -
ROSALIND
- -
-
Not one to throw at a dog.
-
- -
CELIA
-
-
No, thy words are too precious to be cast away upon
- -
curs; throw some of them at me; come, lame me with reasons.
-
- -
ROSALIND
- -
CELIA
-
-
But is all this for your father?
- -
- -
-
Then there were two cousins laid up; when the one
-
should be lamed with reasons and the other mad
-
without any.
-
- -
ROSALIND
-
-
No, some of it is for my child's father. O, how
- -
full of briers is this working-day world!
-
- -
CELIA
- -
- -
They are but burs, cousin, thrown upon thee in
-
holiday foolery: if we walk not in the trodden
- -
paths our very petticoats will catch them.
-
- -
ROSALIND
- -
-
I could shake them off my coat: these burs are in my heart.
-
- -
CELIA
- -
-
Hem them away.
- -
- -
ROSALIND
-
- -
I would try, if I could cry 'hem' and have him.
-
- -
CELIA
- -
-
Come, come, wrestle with thy affections.
- -
- -
ROSALIND
-
-
O, they take the part of a better wrestler than myself!
- -
- -
CELIA
-
- -
O, a good wish upon you! you will try in time, in
-
despite of a fall. But, turning these jests out of
-
service, let us talk in good earnest: is it
- -
possible, on such a sudden, you should fall into so
-
strong a liking with old Sir Rowland's youngest son?
-
- -
ROSALIND
-
-
The duke my father loved his father dearly.
- -
- -
CELIA
-
- -
Doth it therefore ensue that you should love his son
- -
dearly? By this kind of chase, I should hate him,
-
for my father hated his father dearly; yet I hate
- -
not Orlando.
-
- -
ROSALIND
- -
-
No, faith, hate him not, for my sake.
-
- -
CELIA
- -
-
Why should I not? doth he not deserve well?
- -
- -
ROSALIND
- -
-
Let me love him for that, and do you love him
-
because I do. Look, here comes the duke.
-
- -
CELIA
-
- -
With his eyes full of anger.
-
Enter DUKE FREDERICK, with Lords
-
- -
DUKE FREDERICK
- -
-
Mistress, dispatch you with your safest haste
- -
And get you from our court.
-
- -
ROSALIND
- -
- -
Me, uncle?
-
- -
DUKE FREDERICK
-
-
You, cousin
-
Within these ten days if that thou be'st found
- -
So near our public court as twenty miles,
-
Thou diest for it.
- -
- -
ROSALIND
-
-
I do beseech your grace,
- -
Let me the knowledge of my fault bear with me:
-
If with myself I hold intelligence
- -
Or have acquaintance with mine own desires,
-
If that I do not dream or be not frantic,--
-
As I do trust I am not--then, dear uncle,
- -
Never so much as in a thought unborn
- -
Did I offend your highness.
- -
- -
DUKE FREDERICK
-
-
Thus do all traitors:
-
If their purgation did consist in words,
- -
They are as innocent as grace itself:
- -
Let it suffice thee that I trust thee not.
- -
- -
ROSALIND
-
-
Yet your mistrust cannot make me a traitor:
- -
Tell me whereon the likelihood depends.
- -
- -
DUKE FREDERICK
-
-
Thou art thy father's daughter; there's enough.
-
- -
ROSALIND
- -
-
So was I when your highness took his dukedom;
-
So was I when your highness banish'd him:
-
Treason is not inherited, my lord;
-
Or, if we did derive it from our friends,
- -
What's that to me? my father was no traitor:
- -
Then, good my liege, mistake me not so much
-
To think my poverty is treacherous.
- -
- -
CELIA
-
- -
Dear sovereign, hear me speak.
- -
- -
DUKE FREDERICK
-
-
Ay, Celia; we stay'd her for your sake,
-
Else had she with her father ranged along.
- -
- -
CELIA
-
-
I did not then entreat to have her stay;
-
It was your pleasure and your own remorse:
-
I was too young that time to value her;
- -
But now I know her: if she be a traitor,
- -
Why so am I; we still have slept together,
-
Rose at an instant, learn'd, play'd, eat together,
-
And wheresoever we went, like Juno's swans,
- -
Still we went coupled and inseparable.
-
- -
DUKE FREDERICK
- -
-
She is too subtle for thee; and her smoothness,
-
Her very silence and her patience
-
Speak to the people, and they pity her.
-
Thou art a fool: she robs thee of thy name;
- -
And thou wilt show more bright and seem more virtuous
- -
When she is gone. Then open not thy lips:
-
Firm and irrevocable is my doom
-
Which I have pass'd upon her; she is banish'd.
-
- -
CELIA
- -
-
Pronounce that sentence then on me, my liege:
-
I cannot live out of her company.
-
- -
DUKE FREDERICK
-
-
You are a fool. You, niece, provide yourself:
- -
If you outstay the time, upon mine honour,
-
And in the greatness of my word, you die.
-
Exeunt DUKE FREDERICK and Lords
-
- -
CELIA
-
- -
O my poor Rosalind, whither wilt thou go?
- -
Wilt thou change fathers? I will give thee mine.
-
I charge thee, be not thou more grieved than I am.
-
- -
ROSALIND
- -
- -
I have more cause.
-
- -
CELIA
-
-
Thou hast not, cousin;
- -
Prithee be cheerful: know'st thou not, the duke
- -
Hath banish'd me, his daughter?
-
- -
ROSALIND
-
-
That he hath not.
- -
- -
CELIA
-
-
No, hath not? Rosalind lacks then the love
- -
Which teacheth thee that thou and I am one:
-
Shall we be sunder'd? shall we part, sweet girl?
- -
No: let my father seek another heir.
- -
Therefore devise with me how we may fly,
-
Whither to go and what to bear with us;
-
And do not seek to take your change upon you,
-
To bear your griefs yourself and leave me out;
-
For, by this heaven, now at our sorrows pale,
- -
Say what thou canst, I'll go along with thee.
- -
- -
ROSALIND
-
-
Why, whither shall we go?
-
- -
CELIA
- -
-
To seek my uncle in the forest of Arden.
-
- -
ROSALIND
- -
-
Alas, what danger will it be to us,
- -
Maids as we are, to travel forth so far!
-
Beauty provoketh thieves sooner than gold.
-
- -
CELIA
- -
-
I'll put myself in poor and mean attire
- -
And with a kind of umber smirch my face;
-
The like do you: so shall we pass along
- -
And never stir assailants.
-
- -
ROSALIND
-
- -
Were it not better,
-
Because that I am more than common tall,
-
That I did suit me all points like a man?
-
A gallant curtle-axe upon my thigh,
- -
A boar-spear in my hand; and--in my heart
- -
Lie there what hidden woman's fear there will--
- -
We'll have a swashing and a martial outside,
-
As many other mannish cowards have
-
That do outface it with their semblances.
- -
- -
CELIA
-
- -
What shall I call thee when thou art a man?
-
- -
ROSALIND
- -
-
I'll have no worse a name than Jove's own page;
-
And therefore look you call me Ganymede.
- -
But what will you be call'd?
-
- -
CELIA
- -
-
Something that hath a reference to my state
-
No longer Celia, but Aliena.
- -
- -
ROSALIND
-
- -
But, cousin, what if we assay'd to steal
-
The clownish fool out of your father's court?
-
Would he not be a comfort to our travel?
- -
- -
CELIA
-
- -
He'll go along o'er the wide world with me;
- -
Leave me alone to woo him. Let's away,
-
And get our jewels and our wealth together,
- -
Devise the fittest time and safest way
-
To hide us from pursuit that will be made
- -
After my flight. Now go we in content
-
To liberty and not to banishment.
-
Exeunt
-
- -
-
+
- +