HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 19 community runs

Desktop Results:
Chrome 14 runs
textContent
2.5M/s
replaceChildren
341K/s

Fastest: textContent (7.3x faster)

View exact numbers
  • textContent: 2,504,107 ops/sec
  • replaceChildren: 340,986 ops/sec
Firefox 5 runs
textContent
247K/s
replaceChildren
238K/s
View exact numbers
  • textContent: 247,218 ops/sec
  • replaceChildren: 238,431 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    textContent
    replaceChildren

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Chrome 148 on Windows
View result in a separate tab
textContent
457K/s
replaceChildren
436K/s
View exact numbers
Test name Executions per second
textContent 457,046 Ops/sec
replaceChildren 435,885 Ops/sec