NYCPHP Meetup

NYPHP.org

[nycphp-talk] Length of variable names

tedd tedd at sperling.com
Wed Jul 4 10:02:09 EDT 2007


At 8:09 PM -0400 7/3/07, David Krings wrote:
>BUT...back to the original question, does the length of a variable 
>name have any impact on performance or such?

Does the length of variable names have any impact on performance?

I doubt it, but it should be easy enough to prove. Just write two 
routines -- one with short names and one with long and have them run 
a set time (perhaps years) and compare their performance.

Does the length of variable names have any impact on such?

If you're the programmer reviewing/maintaining someone else's code, I 
would say "Yes, it does." Both too cryptic and too long makes code 
difficult to read.

Cheers,

tedd
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list