LiveScript
LiveScript copied to clipboard
Suggestion: check for too long ranges such as [0 to 55555]
Some ranges like [0 to 55555] could be replaced with the runtime variant, instead of generating a giant array in code.
(Please keep in mind I'll make some suggestions with no priority at all, just trying to be helpful.)
current limit seems to be 65536
Hmm, I only got up to 30k ish.
ah no, since we add 2 tokens each time, it's 65536/2 = 32768 (32767 works ok). so maybe we should lower it to ~5k maybe, after that it's just too slow. And just generate a runtime range.
CoffeeScript has a limit of around 20 elements, after which it produces a runtime equivalent. So I think that lowering to 5000 elements is still not enough, the code of such arrays takes quite some space in a file.
And maybe produce a runtime equivalent for strings too, after a certain limit? [\가 to \힣] produces quite a large array, but I'll admit there are fewer use cases.