r/javascript • • May 02 '17

YouTube's new UI uses Polymer

https://youtube.googleblog.com/2017/05/a-sneak-peek-at-youtubes-new-look-and.html
212 Upvotes

98 comments sorted by

View all comments

Show parent comment

2

u/dbbk May 03 '17

Are you suggesting that polyfills aren't slower than native implementations?

9

u/ergo14 May 03 '17

No, ofcourse native implementations will be faster - I'm suggesting that YT slugishnes in firefox is related to actual application code. Dbmon tests under Firefox show that the speed with polyfills on firefox is equivalent to other js based solutions. I think it wouldn't be the first time where youtube worked better only on chrome, because of different codepaths/blacklisting.

1

u/sbmitchell May 03 '17

Actually there is a possibility that polyfills can be faster than "native" implementations. It boils down to work done. If a polyfill assumes an edge case can never happen you can skip the check, you can achieve better perf for a particular thing.