javascript - Variable name length vs performance -


how possible, huge difference in variable name length won't cause any performance loss in javascript?

it tooks same time declare var = 0; takes declare var aaaaaaaaaaaaaaa = 0; tooks same time execute computations them.

my fiddle demonstrate

based on @cerbrus's comment:

it causes negligibly small performance difference in practise, when declaring variable. afterwards, gets specific address in memory, , referred address, not variable name, won't affect performance anymore.


however, talking scripting language used on web, shorter variable names can reduce filesize, , speed pageloads. 1 of features of js compilers, such google's.


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -