I go across blog post: http://blog.cdleary.com/2010/09/picing-on-javascript-for-fun-and-profit/
It is about JS performance on accessing object properties and tricks that help reduce that time. Usual access require hash table lookup. Optimized solution makes type checks, if type is not changed we can use direct address from cache.
I wonder is GNU ELisp require hash lookup for symbol? For:
(defun adjust-fill-column (val) (setq fill-column val))
I get:
(byte-compile 'adjust-fill-column)
#[(val) "^H\211^Q\207" [val fill-column] 2]
(disassemble (byte-compile 'adjust-fill-column))
byte code:
args: (val)
0 varref val
1 dup
2 varset fill-column
3 return
Does that mean that on every call of adjust-fill-column
varref
and varset
do hash lookup? Is that done inside body or when [val fill-column]
array processed?