constantize-eval-vs-obj-key

Benchmark created by Cole Turner on


Setup

var MyObject = "test";
  var objects = {
      'MyObject': MyObject
  };

Test runner

Ready to run.

Testing in
TestOps/sec
Constantize with Eval
eval('MyObject');
ready
Constantize with Obj Key
objects['MyObject']
ready

Revisions

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

  • Revision 1: published by Cole Turner on