Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12683

Re: multiple dynamic text fields

Date 2012-03-14 15:05 +1100
From Andrew Poulos <ap_prog@hotmail.com>
Newsgroups comp.lang.javascript
Subject Re: multiple dynamic text fields
References (7 earlier) <f4612afd-0c05-42ae-b66c-ba8f797ec901@v22g2000yqm.googlegroups.com> <jjo9g6$9of$1@speranza.aioe.org> <6325cb13-a1c2-447d-8ee8-710e481d4c0d@k29g2000yqc.googlegroups.com> <SZydnYa7O6sNQMLSnZ2dnUVZ_tOdnZ2d@westnet.com.au> <ac2cdf29-8639-4ea7-ba91-4a2246817385@k4g2000yqa.googlegroups.com>
Message-ID <AcGdnVIgYq-EhP3SnZ2dnUVZ_sydnZ2d@westnet.com.au> (permalink)

Show all headers | View raw


On 14/03/2012 12:55 PM, David Mark wrote:
> On Mar 13, 7:51 pm, Andrew Poulos<ap_p...@hotmail.com>  wrote:
>> On 14/03/2012 9:36 AM, David Mark wrote:
>>
>>> Because jQuery is very poorly written.  I recently posted some
>>> examples of this on the JSPerf site, pitting one-liner cross-browser
>>> functions vs. My Library (a four-year-old library) vs. jQuery.
>>> Unbelievably, jQuery was consistently 10-100 times slower at basic
>>> tasks.  Attaching listeners was particularly slow (not to mention
>>> awkward).  Not long after, they copied my concise on/off methods, but
>>> I doubt that syntactic sugar improved their performance any. :(
>>
>>> http://jsperf.com/browse/david-mark
>>> http://jsperf.com/adding-and-removing-listeners-part-2
>>
>> 1. Its unbelievable that jquery is so much slower in the 'setting the
>> style attribute' test. It completed about 145K operations/sec versus
>> 3.2M operations/sec for the cross browser way. The cross browser way is
>> more that 22 times faster!
>>
>> 2. Some of the tests give a script error when run in Firefox 10.0.2.
>
> I only saw an error caught and reported in a pink box (with no
> pertinent info) on loading the first test (and only the first time).
> The site doesn't seem to be recording results for FF 10 either.

The error with no pertinent info comes in Firefox 10.0.2 while its 
running the 'My Library' tests on:
   Removing Element Attributes Optimized
   Setting inner HTML of DIV (2)
And then there's this error
   Has Class (1)
     ReferenceError: MJ is not defined.
     fileName: http://jsperf.com/bind-jquery-vs-addevent-mjlib/3
     lineNumber: 1

[Enough testing for now]

> Here is a typical result from FF 10:-
>
> Chrome 13.0.782	2,885,834	898,102	78,951	1
> Chrome 14.0.835	1,622,298	434,627	25,368	3
> Chrome 15.0.874	2,450,642	807,696	68,140	3
> Chrome 17.0.963	3,155,691	1,474,550	101,658	3
> Firefox 6.0.2	1,129,588	435,858	32,674	3
> Firefox 8.0	3,135,401	913,051	54,460	2
> Firefox Beta 12.0a2	1,874,259	500,396	49,073	1
> IE 9.0	720,506	375,765	3,689	1
> Opera 11.51	340,953	201,199	2,333	1
> Safari 5.1.2	6,167,981	1,614,097	114,380	1
>
> http://jsperf.com/removing-element-attributes-optimized
>
> Should be apparent which column is which.  Safari 5 is over 6
> *million* attributes removed for the cross-browser rendition.  My
> Library comes in second with over 1.6 million.  jQuery is just over
> 100 thousand.  Think of those numbers in terms of dollars.  Not just
> for effect, but those seeking to create the next "Facebook Killer" (or
> a basic Website that is responsive on battery-powered mobile devices)
> should realize that the jQuery authors have been asleep at the switch
> for a long time (and this is the latest version, after numerous well-
> publicized "optimizations" that reportedly increased performance
> hundreds of times over).

I don't disagree with your comments about jQuery. What I can't reconcile 
is why my computer theorist friends who can write in a huge number of 
languages believe that jQuery serves them well and can't see any issues. 
Each app they build appears to be well received.

Andrew Poulos

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-04 13:00 +0000
  Re: multiple dynamic text fields Jeff North <jnorthau@yahoo.com.au> - 2012-03-05 14:33 +1100
    Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-08 18:14 +0000
      Re: multiple dynamic text fields Jeff North <jnorthau@yahoo.com.au> - 2012-03-09 17:38 +1100
        Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-09 18:46 +0000
          Re: multiple dynamic text fields Jeff North <jnorthau@yahoo.com.au> - 2012-03-10 17:19 +1100
            Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-11 13:55 +0000
              Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 20:16 -0700
                Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-13 20:08 +0000
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 15:36 -0700
                Re: multiple dynamic text fields Andrew Poulos <ap_prog@hotmail.com> - 2012-03-14 10:51 +1100
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 18:12 -0700
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 18:55 -0700
                Re: multiple dynamic text fields Andrew Poulos <ap_prog@hotmail.com> - 2012-03-14 15:05 +1100
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 21:38 -0700
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 21:56 -0700
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 22:49 -0700
                Re: multiple dynamic text fields Andrew Poulos <ap_prog@hotmail.com> - 2012-03-14 17:05 +1100
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-14 00:23 -0700
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 22:06 -0700
                Re: multiple dynamic text fields Andrew Poulos <ap_prog@hotmail.com> - 2012-03-14 17:07 +1100
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-14 00:28 -0700
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 22:11 -0700
                Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-14 21:56 +0000
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-14 14:58 -0700
                Re: multiple dynamic text fields hipa <hipa.invalid@telenet.be> - 2012-03-15 06:27 +0000
                Re: multiple dynamic text fields David Mark <dmark.cinsoft@gmail.com> - 2012-03-14 23:46 -0700

csiph-web