Re: Interesting speed comparison ..
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 54391
interpreted = N
texte = Thanks scott .. makes sense ..As andrew has mentioned this morning the test was initially designed to test on WebDNA install against another .. yesterday I was able to shave 10 ticks off one of the WebDNA tests by changing the syntax slightly ..To be really useful we would need to test real world applications - as a side note our PHP version of our CMS is slower than the WebDNA version .. one of the main reasons we made this test ..This page http://utility.blackpepper.co.nz/webdna_speed/show_speed.html has a v5 comparison at the top of the list .. It's actually quite a bit faster than v4.5.1 ..The other important thing to remember is PHP took 140 more lines of code, which is not a lot unless you are talking about a 300 line page ...Sorry for keeping you up all night Scott .. ;)AlainOn 22/11/2003, at 9:04 AM, Scott Anderson wrote:> Having seen this, of course I had to download and install PHP on my dev> machine and run the same tests ;) The php_speed.txt had a couple > syntax> errors, but after a couple quick changes it was running fine. I was > up most> of the night working on this ( thanks, Alain and Andrew ;) )>> The 'text variables' test is definitely the culprit here. Creating a > large> number of WebDNA text variables early in the template, has a dramatic > effect> on ALL other WebDNA processing for the remainder of the template.>> A few reasons for this:> 1. In most cases, WebDNA does not have a 'qualifier' to denote a text> variable, like the '$' in php. The WebDNA parser has to query all > outer> context objects, asking each if it can identify a particular token. > This> does add more parsing overhead. I say 'in most cases', because you can> access text variables using [text]mytextvar[/text], which will resolve > a bit> quicker, since the wrapping [text] identifies the inner content as a > text> variable.>> 2. The list object, used to store and retrieve text variables, is not> optimized for speed.>> 3. Finally, and perhaps the biggest reason for the performance hit, is > the> order in which the WebDNA parser queries the outer context objects, > when> resolving a token. Many tokens, including context names and tag > names, are> run through the list of known text and math variables, before being> identified as a context name or global WebDNA tag. So if the variable > list> is large, identification of context and tags is slowed down.>>> I think on average, most WebDNA programmers will not create hundreds, > or> thousands, of text variables in one template. So they will not be > impacted> by the issues described above. For those that do, there are a few > WebDNA> 5.x features that can be used to help minimize the parsing overhead. > The> [Scope] context can be used to wrap sections of code that create and > use> several text variables, so that they are destroyed when the scope > closes. A> WebDNA array can be used to store a large number of values. A WebDNA> function can be used to define code blocks that need to generate a > large> number of variables. Function calls are wrapped by an implied scope, > so> that variables created within the function are destroyed when the > function> is finished (unless the variables are created explicitly in the global > name> space or an outer scope).>>> We do plan to address the second and third items, so that performance > is> fast even for very large variable lists.>>>>>>> -----Original Message-----> From: Alain Russell [mailto:alain.russell@blackpepper.co.nz]> Sent: Thursday, November 20, 2003 6:53 PM> To: WebDNA Talk> Subject: Interesting speed comparison ..>>> So Andrew has made a copy of the speed test in PHP ..> Interesting results ..>> http://utility.blackpepper.co.nz/webdna_speed/php_speed.php> http://utility.blackpepper.co.nz/webdna_speed/webdna_speed.html>> This is the same machine - Dual 2G G5, Dual HDD ..>> The source code is available for people that know PHP (You'll need to> create a username/database etc)> http://utility.blackpepper.co.nz/webdna_speed/php_speed.txt>> Any comment from SMSI on why variables/math etc are so much slower ??>> Running v4.5.1 by the way ..>> Alain>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thanks scott .. makes sense ..As andrew has mentioned this morning the test was initially designed to test on WebDNA install against another .. yesterday I was able to shave 10 ticks off one of the WebDNA tests by changing the syntax slightly ..To be really useful we would need to test real world applications - as a side note our PHP version of our CMS is slower than the WebDNA version .. one of the main reasons we made this test ..This page http://utility.blackpepper.co.nz/webdna_speed/show_speed.html has a v5 comparison at the top of the list .. It's actually quite a bit faster than v4.5.1 ..The other important thing to remember is PHP took 140 more lines of code, which is not a lot unless you are talking about a 300 line page ...Sorry for keeping you up all night Scott .. ;)AlainOn 22/11/2003, at 9:04 AM, Scott Anderson wrote:> Having seen this, of course I had to download and install PHP on my dev> machine and run the same tests ;) The php_speed.txt had a couple > syntax> errors, but after a couple quick changes it was running fine. I was > up most> of the night working on this ( thanks, Alain and Andrew ;) )>> The 'text variables' test is definitely the culprit here. Creating a > large> number of WebDNA text variables early in the template, has a dramatic > effect> on ALL other WebDNA processing for the remainder of the template.>> A few reasons for this:> 1. In most cases, WebDNA does not have a 'qualifier' to denote a text> variable, like the '$' in php. The WebDNA parser has to query all > outer> context objects, asking each if it can identify a particular token. > This> does add more parsing overhead. I say 'in most cases', because you can> access text variables using [text]mytextvar[/text], which will resolve > a bit> quicker, since the wrapping [text] identifies the inner content as a > text> variable.>> 2. The list object, used to store and retrieve text variables, is not> optimized for speed.>> 3. Finally, and perhaps the biggest reason for the performance hit, is > the> order in which the WebDNA parser queries the outer context objects, > when> resolving a token. Many tokens, including context names and tag > names, are> run through the list of known text and math variables, before being> identified as a context name or global WebDNA tag. So if the variable > list> is large, identification of context and tags is slowed down.>>> I think on average, most WebDNA programmers will not create hundreds, > or> thousands, of text variables in one template. So they will not be > impacted> by the issues described above. For those that do, there are a few > WebDNA> 5.x features that can be used to help minimize the parsing overhead. > The> [scope] context can be used to wrap sections of code that create and > use> several text variables, so that they are destroyed when the scope > closes. A> WebDNA array can be used to store a large number of values. A WebDNA> function can be used to define code blocks that need to generate a > large> number of variables. Function calls are wrapped by an implied scope, > so> that variables created within the function are destroyed when the > function> is finished (unless the variables are created explicitly in the global > name> space or an outer scope).>>> We do plan to address the second and third items, so that performance > is> fast even for very large variable lists.>>>>>>> -----Original Message-----> From: Alain Russell [mailto:alain.russell@blackpepper.co.nz]> Sent: Thursday, November 20, 2003 6:53 PM> To: WebDNA Talk> Subject: Interesting speed comparison ..>>> So Andrew has made a copy of the speed test in PHP ..> Interesting results ..>> http://utility.blackpepper.co.nz/webdna_speed/php_speed.php> http://utility.blackpepper.co.nz/webdna_speed/webdna_speed.html>> This is the same machine - Dual 2G G5, Dual HDD ..>> The source code is available for people that know PHP (You'll need to> create a username/database etc)> http://utility.blackpepper.co.nz/webdna_speed/php_speed.txt>> Any comment from SMSI on why variables/math etc are so much slower ??>> Running v4.5.1 by the way ..>> Alain>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Alain Russell
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Dumb Question about Docs (1997)
form data submission get (1997)
JavaScript (1998)
Nested vs conditional (1997)
MacAuthorize order data fields WAS:How To question... (1997)
Error: could not create email file in (2003)
Encrypting WebDNA Templates (1999)
Webstar 1.3.1 PPC (1997)
Emailer choke (1997)
SKU (1997)
Exclamation point (1997)
ConvertWords (2002)
Artwork (1997)
Code for Accessing E-mail Accounts (2005)
More news on 5.0 (2003)
Fun with dates (1997)
Configuring E-mail (1997)
[SHOWIF AND/OR] (1997)
How do I specify a & character in Grep? (2000)
Re:no [search] with NT (1997)