"use strict"; (function (factory) { if (typeof Benchmark !== "undefined") { factory(Benchmark); } else { factory(require("benchmark")); } })(function (Benchmark) { var suite = new Benchmark.Suite; Benchmark.prototype.setup = function () { function treeWalker(root, visit) { const walker = document.createTreeWalker(root, NodeFilter.ELEMENT, null, false); let node; while ((node = walker.nextNode())) { visit(node); } } function forwardTreeWalker(root, visit) { let node = root.firstChild; const {nodeType} = node; if (nodeType === 1 /* Node.ELEMENT_NODE */) { visit(node); } while (node !== root) { visit(node); const fc = node.firstChild; if (fc) { node = fc; } else { let ns; while ((ns = node.nextSibling) === null) { if ((node = node.parentNode) === root) { return; } } node = ns; } } } const BODY = document.createElement('div') BODY.innerHTML = `