escaped unicode vs fromCharCode vs html entity

Benchmark created by ui on


Setup

var domEl = document.createElement('DIV');

Teardown


    domEl = void 0;
  

Test runner

Ready to run.

Testing in
TestOps/sec
unicode
domEl.appendChild(document.createTextNode('\u25BC'));
ready
fromCharCode
domEl.appendChild(document.createTextNode(String.fromCharCode(9660)));
ready
html entity
domEl.innerHTML = '▼';
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.