Closed aeosynth closed 11 years ago
Good "shims" are usually faster than the native implems, I remember @jdalton 's talk about that.
so keep the fast shims
To clarify, if you're using newer native methods, and then wanting to support browsers that don't have them, your shims should follow the spec. This will make them slower, but necessary if you are putting shims onto Array.prototype
or other builtins.
To keep things speedy I've used utility methods instead that can opt-in to native use when it's proven faster for given environments. This allows me to avoid following spec so close that it hurts perf for fallbacks while getting the speed of native when it's relevant.
We quit simulating [].indexOf
for similar reasons.
are there any shims coco uses which have worse performance than native methods? if not, this issue can be closed as pointless
are there any shims coco uses which have worse performance than native methods?
None atm I believe.
if not, this issue can be closed as pointless
Alrighty.
If you point me to the file w/ the shims I can do a quick review as well.
say i'm building a mobile app, and have access to all the latest js features; i'd like to pass a flag to the compiler, telling it to use those features instead of shims