ES6 Destructure vs ES5 Assignment

Benchmark created by James on


Setup

var object = {
    title: 'thisisastring',
    text: 'anotherstringhere',
    another: 'valueisathing',
    basic: [ 'an', 'array', 'of', 'strings' ]
  }

Test runner

Ready to run.

Testing in
TestOps/sec
ES6 Destructure
let { title } = object
ready
ES5 Assign
var title = object.title
ready

Revisions

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