+
+
+
+
+
diff --git a/modules/benchmarks/src/largetable/iv/largetable.js b/modules/benchmarks/src/largetable/iv/largetable.js
new file mode 100644
index 0000000000..0d39e9b63a
--- /dev/null
+++ b/modules/benchmarks/src/largetable/iv/largetable.js
@@ -0,0 +1,9 @@
+/*
+ Copyright Google Inc. All Rights Reserved.
+ Use of this source code is governed by an MIT-style license that can be
+ found in the LICENSE file at https://angular.io/license
+*/
+// clang-format off
+function $nextRef(){return++refCount}function $el(e,n,r,t){var o={kind:"E",index:n,name:r,ref:t?++refCount:0,children:[],props:NO_PROPS,domNode:null};return e.children[e.children.length]=o,o}function $cg(e,n,r,t){var o=n.children[e];if(o&&o.index===t)return o.childChanges=null,o;var a={kind:"G",index:t,cm:1,props:{},changes:null,childChanges:null,ref:++refCount,children:[],domNode:null,parent:n,$lastChange:refreshCount,$lastRefresh:refreshCount};return r.cm?n.children[n.children.length]=a:(n.children.splice(e,0,a),addChangeInstruction(a,{kind:"CG",node:a,parent:n,position:e,nextSibling:findNextDomSibling(n,e)})),a}function $lg(e,n){addChildChanges(e,n)}function $dg(e,n,r,t){for(var o=n.children[e];o&&o.indexi;i++)retrieveChanges(t[i],n,r);r&&(e.childChanges=null)}if(o&&o.length){for(var a=n.length,i=0;o.length>i;i++,a++)n[a]=o[i];r&&(e.changes=null)}}function addChangeInstruction(e,n){e.changes?e.changes.splice(e.changes.length,0,n):e.changes=[n],e.$lastChange=refreshCount}function addChildChanges(e,n){(e.changes||e.childChanges)&&(n.childChanges?n.childChanges.push(e):n.childChanges=[e],n.$lastChange=refreshCount)}function findNextDomSibling(e,n,r){void 0===r&&(r=!1);var t,o=e.children;if(n+1i;i++)if(a.children[i]===e)return findNextDomSibling(a,i)}return null}function htmlRenderer(e,n,r){return new Renderer(e,n,r)}function processChanges(e,n,r){for(var t=0,o=e;ti;i++)createDomNode(o[i],n,r,t)}function createElementDomNode(e,n,r,t){var o,a,i=e.props,d=e.atts;if(d&&d.xmlns&&(t=d.xmlns),a=t?r.createElementNS(t,e.name):r.createElement(e.name),d)for(var l in d)d.hasOwnProperty(l)&&a.setAttribute(l,d[l]);if(i)if(t&&!t.match(RX_HTML))for(var l in i)i.hasOwnProperty(l)&&a.setAttribute(l,i[l]);else for(var l in i)if(i.hasOwnProperty(l)&&void 0!==(o=i[l]))if(o&&o.$isMap)if("classList"===l){var c=[];d&&(d.class?c.push(d.class):d.className&&c.push(d.className));for(var s in o)o.hasOwnProperty(s)&&"$"!==s[0]&&o[s]&&c.push(s);c.length&&(a.className=c.join(" "))}else"style"===l&&setMapProperties(a.style,o);else o.call?"o"===l[0]&&addEvtListener(a,e,l):a[l]=o;e.domNode=a,n.appendChild(a),processChildNodes(e,a,r,t)}function setMapProperties(e,n){for(var r in n)n.hasOwnProperty(r)&&"$"!==r[0]&&(e[r]=n[r])}function addEvtListener(e,n,r){e.addEventListener(r.substring(2),function(e){n.props[r].call(n,e)})}function removeGroupFromDom(e,n,r){var t,o=e.children,a=e.domNode;if(o){var i=o.length;n&&r&&countGroupDomChildren(e)===a.childNodes.length&&(a.textContent="",n=!1);for(var d=0;i>d;d++)"G"===(t=o[d]).kind?removeGroupFromDom(t,n,!1):"T"!==t.kind&&"E"!==t.kind||n&&t.domNode&&t.domNode.parentNode===a&&a.removeChild(t.domNode)}e.domNode=null}function countGroupDomChildren(e){for(var n,r,t=0,o=e.children,a=o.length,i=0;a>i;i++)"G"===(r=(n=o[i]).kind)?t+=countGroupDomChildren(n):"D"!==r&&t++;return t}function replaceDomNode(e,n,r){if(e!==n&&r.domNode===e&&(r.domNode=n,"G"===r.kind))for(var t=r.children,o=0;t.length>o;o++)replaceDomNode(e,n,t[o])}function getIntParameter(e){return parseInt(getStringParameter(e),10)}function getStringParameter(e){for(var n,r,t=document.querySelectorAll('input[name="'+e+'"]'),o=0;o
+
+
+
+
Params
+
+
+
IV Tree Benchmark
+
+
+
+
+
+
+
+
+
+
+ Change detection runs:
+
+
+
+
+
+
diff --git a/modules/benchmarks/src/tree/iv/tree.js b/modules/benchmarks/src/tree/iv/tree.js
new file mode 100644
index 0000000000..67180822c8
--- /dev/null
+++ b/modules/benchmarks/src/tree/iv/tree.js
@@ -0,0 +1,9 @@
+/*
+ Copyright Google Inc. All Rights Reserved.
+ Use of this source code is governed by an MIT-style license that can be
+ found in the LICENSE file at https://angular.io/license
+*/
+/* tslint:disable */
+// clang-format off
+function $nextRef(){return++refCount}function $el(e,n,r,t){var o={kind:"E",index:n,name:r,ref:t?++refCount:0,children:[],props:NO_PROPS,domNode:null};return e.children[e.children.length]=o,o}function $cc(e,n,r,t,o,i){var d=!0===t.$isClassCpt,a={kind:"G",index:n,cm:1,cpt:d?new t:null,render:d?null:t,props:r,changes:null,childChanges:null,ref:i?++refCount:0,children:[],domNode:null,sdGroup:null,ltGroup:null,parent:e,$lastChange:refreshCount,$lastRefresh:refreshCount};if(e.children[e.children.length]=a,a.cpt){var l=a.cpt;l.$node=a,l.$renderer=$iv.renderer,l.props=a.props,l.init&&l.init()}return o?a.ltGroup={kind:"G",index:n,cm:1,cpt:a.cpt,render:a.render,props:a.props,changes:null,childChanges:null,ref:0,children:[],domNode:null,sdGroup:a,ltGroup:null,parent:null,$lastChange:refreshCount,$lastRefresh:refreshCount}:(renderCpt(a),a)}function $cg(e,n,r,t){var o=n.children[e];if(o&&o.index===t)return o.childChanges=null,o;var i={kind:"G",index:t,cm:1,props:{},changes:null,childChanges:null,ref:++refCount,children:[],domNode:null,parent:n,$lastChange:refreshCount,$lastRefresh:refreshCount};return r.cm?n.children[n.children.length]=i:(n.children.splice(e,0,i),addChangeInstruction(i,{kind:"CG",node:i,parent:n,position:e,nextSibling:findNextDomSibling(n,e)})),i}function $lg(e,n){addChildChanges(e,n)}function $dg(e,n,r,t){for(var o=n.children[e];o&&o.indexd;d++)retrieveChanges(t[d],n,r);r&&(e.childChanges=null)}if(o&&o.length){for(var i=n.length,d=0;o.length>d;d++,i++)n[i]=o[d];r&&(e.changes=null)}}function addChangeInstruction(e,n){e.changes?e.changes.splice(e.changes.length,0,n):e.changes=[n],e.$lastChange=refreshCount}function addChildChanges(e,n){(e.changes||e.childChanges)&&(n.childChanges?n.childChanges.push(e):n.childChanges=[e],n.$lastChange=refreshCount)}function findNextDomSibling(e,n,r){void 0===r&&(r=!1);var t,o=e.children;if(n+1d;d++)if(i.children[d]===e)return findNextDomSibling(i,d)}return null}function htmlRenderer(e,n,r){return new Renderer(e,n,r)}function processChanges(e,n,r){for(var t=0,o=e;td;d++)createDomNode(o[d],n,r,t)}function createElementDomNode(e,n,r,t){var o,i,d=e.props,a=e.atts;if(a&&a.xmlns&&(t=a.xmlns),i=t?r.createElementNS(t,e.name):r.createElement(e.name),a)for(var l in a)a.hasOwnProperty(l)&&i.setAttribute(l,a[l]);if(d)if(t&&!t.match(RX_HTML))for(var l in d)d.hasOwnProperty(l)&&i.setAttribute(l,d[l]);else for(var l in d)if(d.hasOwnProperty(l)&&void 0!==(o=d[l]))if(o&&o.$isMap)if("classList"===l){var c=[];a&&(a.class?c.push(a.class):a.className&&c.push(a.className));for(var s in o)o.hasOwnProperty(s)&&"$"!==s[0]&&o[s]&&c.push(s);c.length&&(i.className=c.join(" "))}else"style"===l&&setMapProperties(i.style,o);else o.call?"o"===l[0]&&addEvtListener(i,e,l):i[l]=o;e.domNode=i,n.appendChild(i),processChildNodes(e,i,r,t)}function setMapProperties(e,n){for(var r in n)n.hasOwnProperty(r)&&"$"!==r[0]&&(e[r]=n[r])}function addEvtListener(e,n,r){e.addEventListener(r.substring(2),function(e){n.props[r].call(n,e)})}function removeGroupFromDom(e,n,r){var t,o=e.children,i=e.domNode;if(o){var d=o.length;n&&r&&countGroupDomChildren(e)===i.childNodes.length&&(i.textContent="",n=!1);for(var a=0;d>a;a++)"G"===(t=o[a]).kind?removeGroupFromDom(t,n,!1):"T"!==t.kind&&"E"!==t.kind||n&&t.domNode&&t.domNode.parentNode===i&&i.removeChild(t.domNode)}e.domNode=null}function countGroupDomChildren(e){for(var n,r,t=0,o=e.children,i=o.length,d=0;i>d;d++)"G"===(r=(n=o[d]).kind)?t+=countGroupDomChildren(n):"D"!==r&&t++;return t}function replaceDomNode(e,n,r){if(e!==n&&r.domNode===e&&(r.domNode=n,"G"===r.kind))for(var t=r.children,o=0;t.length>o;o++)replaceDomNode(e,n,t[o])}function getIntParameter(e){return parseInt(getStringParameter(e),10)}function getStringParameter(e){for(var n,r,t=document.querySelectorAll('input[name="'+e+'"]'),o=0;o
+
+
+
+
Params
+
+
+
Render3 Tree Benchmark with functions
+
+
+
+
+
+
+
+
+
+
+ Change detection runs:
+
+
+
+
+
+
+
+
diff --git a/modules/benchmarks/src/tree/render3_function/index.ts b/modules/benchmarks/src/tree/render3_function/index.ts
new file mode 100644
index 0000000000..ed8ed8619d
--- /dev/null
+++ b/modules/benchmarks/src/tree/render3_function/index.ts
@@ -0,0 +1,29 @@
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import {renderComponent} from '@angular/core/src/render3/index';
+import {bindAction, profile} from '../../util';
+import {TreeFunction, createDom, destroyDom, detectChanges} from '../render3/tree';
+
+function noop() {}
+
+export function main() {
+ let component: TreeFunction;
+ if (typeof window !== 'undefined') {
+ component = renderComponent(TreeFunction, {renderer: document});
+ bindAction('#createDom', () => createDom(component));
+ bindAction('#destroyDom', () => destroyDom(component));
+ bindAction('#detectChanges', () => detectChanges(component));
+ bindAction(
+ '#detectChangesProfile', profile(() => detectChanges(component), noop, 'detectChanges'));
+ bindAction('#updateDomProfile', profile(() => createDom(component), noop, 'update'));
+ bindAction(
+ '#createDomProfile',
+ profile(() => createDom(component), () => destroyDom(component), 'create'));
+ }
+}