Filip Pizlo (2014-10-30T18:43:59.000Z)
d at domenic.me (2014-11-18T23:19:52.248Z)
On Oct 30, 2014, at 10:44 AM, Steve Fink <sphink at gmail.com> wrote: > I would rather > see engines hyperoptimize > > ```js > for(var i=0; i<size; i++){ someArray[i] = 0; } > ``` > > based on observed type information. Which is not to say that we wouldn't > want to make TA#fill fast too, but the above seems more generally useful. I agree with this philosophy. I would just point out that both in C and Java, having some way for the programmer to say “fill” (i.e. memset/bzero in C, and I forget what it is in Java) has survived despite the compilers being super mature, probably because idiom recognition on loops like this is too fallible in the general case. So, I’d like to see .fill() be part of the language. Anyway, I just filed a bug on our end for this: https://bugs.webkit.org/show_bug.cgi?id=138218