271 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Located in Europe
+4 more
07happydays says

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

2002 posts
  • Has referred 50+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
bitfade says

where ?

3749 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Located in Spain
  • Has sold $125,000+ on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+9 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
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Located in Brazil
+3 more
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
  • Has been part of the Envato Community for over 4 years
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Located in Europe
+4 more
07happydays says
where ?

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

34 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
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.

6024 posts
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+8 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
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+2 more
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