Which is faster? Does one 'read' better than the other?

Results 1 to 3 of 3

Thread: Which is faster? Does one 'read' better than the other?

  1. #1
    Chris Means Guest

    Default Which is faster? Does one 'read' better than the other?

    Seems like this first one would be better, but I&#039d like feedback...<BR><BR>&#060;SELECT NAME="&#060;% =SESN_REFERREDTO &#037;&#062;"><BR>&#060;%<BR>For N=0 To (Application(APP_REFERREDTO_COUNT) - 1)<BR> Response.Write ("&#060;OPTION ")<BR> If Session(SESN_REFERREDTO)=ReferredTo(N) Then <BR> Response.Write ("SELECTED")<BR> End If<BR> Response.Write (">" & ReferredTo(N) & "&#060;/OPTION>")<BR>Next<BR>&#037;&#062;<BR>&#060;/SELECT><BR><BR>OR <BR>&#060;% For N=0 To (Application(APP_REFERREDTO_COUNT) - 1)<BR>&#037;&#062;<BR>&#060;OPTION<BR>&#060;% If Session(SESN_REFERREDTO)=ReferredTo(N) Then &#037;&#062;<BR>SELECTED &#060;% End If &#037;&#062; ><BR>&#060;% =ReferredTo(N) &#037;&#062;<BR>&#060;/OPTION><BR>&#060;% <BR>Next<BR>&#037;&#062;<BR>&#060;/SELECT><BR><BR>Thanks.<BR><BR>-Chris Means<BR>cmeans@intfar.com

  2. #2
    Nathan Pond Guest

    Default RE: Which is faster? Does one 'read' better than the other?

    using Response.Write is faster than opening and closing with &#060;% &#037;&#062;<BR><BR>however, in the case you pointed out, it&#039s so simple that the difference wouldn&#039t be noticed

  3. #3
    Sam Otto Guest

    Default RE: Which is faster? Does one 'read' better than the other?

    You should get out the Application and Session variables and place them in temp vars so you don&#039t have to look them up on every loop (actually I may be wrong about the Application one but definitely get the Session var out into a variable)...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •