Promise performance in Microsoft Edge

tldr: Microsoft Edge's Promise implementation is slow. Use bluebird. Profit.


UPDATE: this issue is fixed in Edge 14 that will ship with the Windows 10 anniversary update.


A lot of my work on the Aurelia project recently has been focused on performance tuning. One task was to track down an issue where Aurelia apps were loading exceptionally slow on Microsoft Edge. I'm talking about 20+ second startup times in Edge for an app that might take 100ms in Chrome. This turned out to be a problem with the SystemJS module loader, which turned out to be a problem with Edge's Promise implementation. Edge promises seem to use setTimeout internally and are much slower than the webkit/chromium implementations. Here's a jsFiddle that demonstrates the issue, in Chrome it runs in 2 - 4 milliseconds, while in Edge it takes 2 - 4 seconds.

I'm a fan of Microsoft Edge and everything the Edge team is doing to push the Web and Node forward. This is not an attempt to bash on Microsoft Edge, I want to accomplish two things with this post:
1. Document the issue and workaround for other folks running into Promise related perf issues on Edge
2. Advance the ball on getting this issue resolved.

If Promise perf is important to your project, please vote on this issue on the Microsoft Edge user-voice site. Here are issues for adding a Promise benchmark to the Octane and JetStream JavaScript benchmarks.