3 ms·
Neat idea. Which subset of the language could be better optimized by interpreters?
by evanrmurphy 16y ago
Neat idea. Which subset of the language could be better optimized by interpreters?
- roel_v 16y agoSubset is hard to define I think, it seems that would have many repercussions. I like JoachimSchipper's suggestion above, that adds a construct in which the programmer promises not to do any funny stuff to certain variables so that the optimizer can go to town on the optimization on them.
- sid0 16y agoSo like ECMAScript 5 strict mode?
- roel_v 16y agoLooks something like it, I didn't know about it. I don't know if it will protect against the things that are mentioned in the article though, the descriptions that I've (admittedly only cursory) read don't say that the things that mentioned in the article aren't allowed anymore under strict mode (like the Object.prototype.valueOf = function() example given). Maybe it is, in which case this would be great it seems. Not that I have intimate knowledge of it, but still ;)