Polyfills might slow down code
Thanks for stopping by John Au-Yeung !!! I always really enjoy your programming articles, so thank you for your response to mine.
Theoretically, there are cases where polyfills will slow down the code significantly, especially if one were to test how well those polyfills actually run in something like IE9.
I found one such case, where the padStart() function from the ES2018 specification is over 8x faster than its polyfill:
ES2017 added the padStart() and padEnd() methods, which add whitespace or other characters to a string until it reaches…
Transpiling should not make any difference
As far as Babel is concerned, translating syntactic sugar from currently-allowed syntax to the older format should be just as fast.