JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="test" ng-controller="ctrl">
Change element with num: <input ng-model="changingIdx">
set val: <input ng-model="changingVal">
<button ng-click="go()">Go</button>
<button ng-click="add100()">Add 100</button>
<div style="overflow: auto; height: 500px;">
<ul>
<li ng-repeat="i in items">
<span bind-static="i.num"></span> = <span bind-static="i.val"></span>
</li>
</ul>
</div>
</div>
JavaScript
angular.module('test', [])
.controller('ctrl', function($scope, $timeout) {
$scope.changingIdx = 0;
$scope.changingVal = 10;
$scope.items = [];
for(var i=0; i<1000; i++)
$scope.items.push({num: i, val: 0});
$scope.go = function() {
var now = (new Date()).getTime();
$scope.items[parseInt($scope.changingIdx)].val = $scope.changingVal;
$timeout(function() {
alert( ((new Date()).getTime() - now) + ' ms');
}, 0);
}
$scope.add100 = function(){
for(var i=0; i<100; i++)
$scope.items.push({num: i, val: 0});
}
})
.directive('bindStatic', function(){
return function(scope, elem, attrs) {
elem.text(scope.$eval(attrs.bindStatic));
}
});