Skip to content

Instantly share code, notes, and snippets.

@pmdartus
Created October 18, 2019 05:46
Show Gist options
  • Save pmdartus/0fe4c643e7c9d9c284ab0fed0282d4b4 to your computer and use it in GitHub Desktop.
Save pmdartus/0fe4c643e7c9d9c284ab0fed0282d4b4 to your computer and use it in GitHub Desktop.
Constructor & prototype reform
Test name Before (ops/sec) After (ops/sec) Delta
dom/compare-document-position/compare ancestor 19,973 19,995 0.11%
dom/compare-document-position/compare descendant 21,624 20,156 -6.79%
dom/compare-document-position/compare siblings 1,138,911 1,128,045 -0.95%
dom/construction/createComment 1,446,494 1,337,418 -7.54%
dom/construction/createDocumentFragment 1,515,799 1,376,833 -9.17%
dom/construction/createElement 223,089 185,578 -16.81%
dom/construction/createEvent 208,710 199,711 -4.31%
dom/construction/createNodeIterator 1,503,558 1,271,095 -15.46%
dom/construction/createProcessingInstruction 773,049 656,662 -15.06%
dom/construction/createTextNode 1,450,963 1,238,958 -14.61%
dom/inner-html/tables 0.32 0.31 -3.13%
dom/named-properties/setAttribute 3,303 2,872 -13.05%
dom/tree-modification/appendChild: many parents 23.71 23.78 0.30%
dom/tree-modification/appendChild: many siblings 238,537 236,672 -0.78%
dom/tree-modification/appendChild: no siblings 224,037 202,877 -9.44%
dom/tree-modification/insertBefore: many siblings 194,390 200,818 3.31%
dom/tree-modification/removeChild: many parents 135 135 0.00%
dom/tree-modification/removeChild: many siblings 135,434 125,604 -7.26%
dom/tree-modification/removeChild: no siblings 86,347 118,918 37.72%
html/parsing/text 12.63 12.6 -0.24%
jsdom/api/new JSDOM() defaults 872 217 -75.11%
jsdom/api/new JSDOM() with many elements 32.97 26.55 -19.47%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment