chromium/third_party/blink/perf_tests/dom/modify-element-id.html

<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
var element;

PerfTestRunner.measureTime({
    description: "Measures performance of changing a DOM element's id property.",

    setup: function() {
        element = document.createElement('div');
    },

    run: function() {
        for (var i = 0; i < 500000; ++i) {
            element.id = 'id1';
            element.id = 'id2';
        }
    }
});
</script>
</body>
</html>