fastest way to access global vars?

R

rghatol

hi guys,
I need your help on this.....
which is the fastest way to access global vars? (performance-wise)

#1. Applcation State

#2. <appSettings>

#3. Static public variable (global.asax)

(are there any other means?)

Thanks,
 
S

seb_gibbs

try doing some tests...

eg.
<%
t1 = timer()
for n = 1 to 50000
x = 5
next
t2 = timer()
response.write t2-t1
%>

Normally find internal processing like the above is super fast, its usally when you start accessing external objects and doing some input output processing when things start to slow down.

If you have very long strings, you can make big improvements by breaking up.


Seb
www.sebsworld.co.uk



**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top