Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Chrome 60
Linux
Other
7 years ago
Test name Executions per second
ng 343.8 Ops/sec
nat 370.2 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
2
<div id='container'></div>
Script Preparation code:
 
window.container = $('#container').get(0);
Tests:
  • ng

    x
     
    var fragment = document.createElement('div');
    fragment.innerHTML = '<div ng-click="click()"></div>';
    angular.bootstrap(fragment);
    container.appendChild(fragment);
  • nat

     
    var fragment = document.createElement('div');
    fragment.innerHTML = '<div onclick="click()"></div>';
    angular.bootstrap(fragment);
    container.appendChild(fragment);