cherry icon indicating copy to clipboard operation
cherry copied to clipboard

Consider emitting JS splice operator to optimize varargs functions

Open borkdude opened this issue 2 years ago • 4 comments

Questions: is splice supported everywhere now? What do we gain, what risk do we take by optimizing this?

borkdude avatar Jul 30 '22 20:07 borkdude

is splice supported everywhere now?

No IE 11, but everything else seems to be ok (including Edge which afaik is the default browser on windows now): https://caniuse.com/mdn-javascript_operators_spread

mk avatar Jul 31 '22 11:07 mk

Cool!

borkdude avatar Jul 31 '22 11:07 borkdude

A small amendment: IE 11 also only has partial support for es6 https://caniuse.com/es6 (which the splice operator is part of), for example no support for es6 class https://caniuse.com/es6-class so it really seems like there’s no compatibility downside to adopting it.

mk avatar Jul 31 '22 19:07 mk

Yeah, IE is dead now right?

borkdude avatar Jul 31 '22 19:07 borkdude