HTML Preparation code:
x
 
1
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
2
Script Preparation code:
 
var ment = angular.module('ent', []);
    ment.controller('EntCtrl', function($compile,$scope) {
      window.compileE = compileE;
      function compileE(code) {
        var scope = $scope.$new();
        $compile(code)(scope);
        scope.$destroy();
      }
    });
    eMent = angular.element('<div><div ng-controller="EntCtrl"></div></div>');
    angular.element(document.body).append(eMent);
    angular.bootstrap(eMent[0], ['ent']);
Tests:
  • ng

     
    window.compileE('<div ng-click="click()"></div>');
  • native

     
    window.compileE('<div onclick="click()"></div>');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    ng
    native

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36
Yandex Browser 24 on Windows
View result in a separate tab
Test name Executions per second
ng 40738.1 Ops/sec
native 38927.4 Ops/sec
Related benchmarks: