AngularJS: digest 1.2.12 vs 1.3.14 (v64)

Revision 64 of this benchmark created on


Description

Benchmark angular 1.2.12 against 1.3.14

Preparation HTML

<script src="https://code.angularjs.org/1.2.12/angular.min.js"></script>
<script> angularBase = angular; angular = undefined;</script>

<script src="https://code.angularjs.org/1.3.14/angular.min.js"></script>
<script> angularExp = angular; angular = undefined;</script>

Setup

function createScopeTree(angular) {
      var rootScope = angular.injector(['ng']).get('$rootScope');
    
      for (var i = 0; i < 100; i++) {
        var child = rootScope.$new();
        for (var j = 0; j < 100; j++) {
          child['a' + j] = {
            b: {
              c: 1
            }
          };
          child.$watch('a' + j + '.b.c', function() {});
        }
      }
      return rootScope;
    }
    
    
    var baseScope = createScopeTree(angularBase);
    var expScope = createScopeTree(angularExp);

Teardown


    baseScope = null;
    expScope = null;
  

Test runner

Ready to run.

Testing in
TestOps/sec
Angular 1.2.12
baseScope.$digest();
ready
Angular 1.3.14
expScope.$digest();
ready

Revisions

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