Originally posted by Chris Davis:
I'm creating a large website and need to optimize it as much as possible.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Warren Dew:
I don't believe SpeedTest2 instances will take up any more memory than SpeedTest1 instances, as they both hold exactly the same amount of data - in this case, one time stamp. The extra functions should not add to the instance data, since all that has to be attached to each instance is an identifier of what class it is, enabling a lookup to a single set of functions serving all instances.
SpeedTest2 is also a bit cleaner, since it encapsulates all the related functions in one class, and according to your tests, faster. I think that would make it the winner.
Originally posted by Chris Davis:
Ahhh.. I think I understand what you�re saying. So, even though the actually compiled class size is, lets say, 120KB, even if I �place that class in the session� 1000+ times the memory used is only 120KB (For the class) + whatever data I have in each class?
-Chris
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Dummy Jim:
Your method is hem... a bit wrong. (what age I have being burn in December in January?) So you need to keep it in mind.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |