Is there any difference in speed in doing <%= _form{"myvariable}%> multiple times as opposed to assigning to a local variable ($myLocal := _form{"myvariable) and writing the local to the page with <%=$myLocal%> many times?

Assigning to a local is always faster. How much faster? Maybe a few microseconds.

Would you say that these few microseconds outweigh the increased number of local variables? Just from a gut feeling, rather than necessarily specific experience? I've always felt that if there is a collection there already - such as _form{} - then it's more efficient to use it, rather than to confuse the code by creating a second variable name for the same data.

Regards
Mark Howells

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to