Monday, March 26, 2012

performance when refer to session object or variable

hi ive got some session objects which im using in some long switch statements.

performance wise is it better to assign the session objects to string variables first then use the variables within my code.

or is it just as good to use the session objects themselves each time within my code using the Tostring() method?

which is better please?If you could enumerate the objects to an intrinsic type like byte or int or something you will see a performance increase after approxamately three calls to the session variables. This is approxamate you can bench it yourself to get more accurate but your initial suspision is correct. I don;t think using a string would perform as well.

0 comments:

Post a Comment