271 posts
  • Bought between 1 and 9 items
  • Contributed a Tutorial to a Tuts+ Site
  • Europe
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 5 000 and 10 000 dollars
07happydays says

Using short variable names is 20% faster than using long variable names. This is tested.

1999 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Author had a Free File of the Month
  • Won a Competition
  • Bought between 10 and 49 items
+4 more
bitfade says

where ?

3747 posts
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Spain
  • Referred between 200 and 499 users
+5 more
pezflash says
Using short variable names is 20% faster than using long variable names. This is tested.

Obviously less bits take less time for the processor. But man, i think we are talking around 5 milliseconds difference in a whole site with, let’s say, 50 different variables.

A bad exported jpg image takes thousands percent more importance, if we talk about optimizing.

I think names of variables should give a quick and useful reference for the developer. That’s all. Then you can name them with all the alphabet, if you find it necessary.

4140 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Sold between 5 000 and 10 000 dollars
tsafi says

Well in a logic way the Pez` (less bits take less time for the processor) is right less syntax var is better ,but I don’t think any one or you will notice this unless you have some big project you are working on and you are trying to save juice speed all you can but again its really negligible and you shouldn’t worry about it at all ,but i have a habit to make it very short on the var

271 posts
  • Bought between 1 and 9 items
  • Contributed a Tutorial to a Tuts+ Site
  • Europe
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 5 000 and 10 000 dollars
07happydays says
where ?

Well I read this some time ago here: http://www.lostinactionscript.com/blog/index.php/talks/ slide 91.

34 posts
  • Bought between 1 and 9 items
  • Europe
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
majakovskij says

Just to clarify…

As far as I know, this tests are usually conducted using simple statement in huge iterations.

So 20% is relative to 5 million of iteration of read/write a variable and nothing else.

In a real project this gain may become 0.1%.

BTW very long variable name may be hard to read than the shorter one.

5751 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+3 more
VF says

^ exactly.

20%, 5 times faster, 100 times faster blah blah are the results of extreme torture tests. As long as the final project doesn’t touches reasonable CPU , it is unnecessary to put hard rules on naming conventions etc. Optimization needs varies widely depending on complexity of project (and end user in case you sell the source code).

Also I am sure that long variable names are very hard to handle while coding. Better way is coding with short names (single or double letter) while working and find – replace with legible words after completion if needed. The variables having more than 2 words will definitely kill our concentration on coding / logic.

132 posts
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 50 000 and 100 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
baklach says

http://blog.hexagonstar.com/as3-short-variablefunction-names-vs-long-ones/#hide This was nice, and i think it answers the question! and it was in 2006 :D

In comments: Someone did something like that in AS2 , read comments…

by
by
by
by
by
by