Promise vs BlueBird

JavaScript performance comparison

Test case created by Oleg

Preparation code

<script src="https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js"></script>

    

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Promise
function A() {
  return new Promise((res, rej) => {
    res('test')
  })
}

A().then(result => {
  if (result !== 'test') {
    throw new Error('Bad result')
  }
})
pending…
BlueBird
function B() {
  return new Promise((res, rej) => {
    res('test')
  })
}

B().then(result => {
  if (result !== 'test') {
    throw new Error('Bad result')
  }
})
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL.

0 Comments