well, he did pass you the html.. :-)
----- Original Message -----
From: "Jeff Greenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Daniel Aborg"
<[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 10:22 AM
Subject: Re: [Dynapi-Dev] My JS Optimization Site
> Very cool. Nice improvement.
>
> In a sense, any loop based on Duff's Device is going to be somewhat
> difficult to follow for anyone encountering it for the first time, so I
> wouldn't worry about that. Anyone using this kind of optimization isn't
> going to be terribly worried about the clarity of their code anyway!
> :-)
>
> I will add this to the one on my site, if that's ok with you...
>
> Jeff Greenberg
> [EMAIL PROTECTED]
>
> Daniel Aborg wrote:
>
> > Hi,
> >
> > Nice site, Jeff. Some interesting tricks there I hadn't thought about.
> > I
> > liked the Duff's Device code, although I noticed it can be improved.
> > Here's a version of the code which doesn't have the case stuff in the
> > main loop but can still do a custom number of iterations. On my
> > computer
> > I get these results in NS4.7 and similar results in IE5:
> >
> > Ordinary: 601 ms
> > Duff's: 431 ms
> > Duff's Optimized: 250 ms
> >
> > Of course, you'll only get a noticable speed improvement on this kind
> > of
> > optimization when you're doing a huge amount of iterations with a loop
> > body which doesn't consume much time. And it's horribly unreadable
> > code.
> >
> > Cheers,
> >
> > Daniel
> >
> >
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev