const count = 100000;
function append() {
const start = Date.now();
for (let i = 0; i < count; i++) {
const el = document.createElement("div");
el.style.background = "#ccc";
el.innerText = `第${i}个`;
document.body.appendChild(el);
}
console.log(Date.now() - start);
}
<button onclick="append()">change</button>