diff --git a/packages/core/test/render3/perf/class_binding/index.ts b/packages/core/test/render3/perf/class_binding/index.ts index f3a0edb4e3..af0ff662ed 100644 --- a/packages/core/test/render3/perf/class_binding/index.ts +++ b/packages/core/test/render3/perf/class_binding/index.ts @@ -18,6 +18,11 @@ const PROFILE_CREATE = true; const PROFILE_UPDATE = true; const PROFILE_NOOP = true; +const consts: TAttributes[] = [ + [AttributeMarker.Classes, 'A', 'B'] // 0 +]; +const context: any = {}; +const benchmarks: Benchmark[] = []; function benchmark( name: string, template: ComponentTemplate, baselineTemplate: ComponentTemplate) { @@ -88,12 +93,6 @@ const A_10 = 'one two three four five six seven eight nine ten'; const B_10 = A_10.toUpperCase(); let toggle = true; -const consts: TAttributes[] = [ - [AttributeMarker.Classes, 'A', 'B'] // 0 -]; -const context: any = {}; -const benchmarks: Benchmark[] = []; - benchmark( `
`, function(rf: RenderFlags, ctx: any) { @@ -103,7 +102,7 @@ benchmark( }, function(rf: RenderFlags, ctx: any) { if (rf & 1) { - ɵɵelement(0, 'div', 1); + ɵɵelement(0, 'div', 0); } }); @@ -177,7 +176,7 @@ benchmark( }, function(rf: RenderFlags, ctx: any) { if (rf & 1) { - ɵɵelement(0, 'div', 1); + ɵɵelement(0, 'div', 0); } if (rf & 2) { ɵɵproperty('className', toggle ? A_1 : B_1); @@ -196,7 +195,7 @@ benchmark( }, function(rf: RenderFlags, ctx: any) { if (rf & 1) { - ɵɵelement(0, 'div', 1); + ɵɵelement(0, 'div', 0); } if (rf & 2) { ɵɵproperty('className', toggle ? A_10 : B_10); @@ -216,7 +215,7 @@ benchmark( }, function(rf: RenderFlags, ctx: any) { if (rf & 1) { - ɵɵelement(0, 'div', 1); + ɵɵelement(0, 'div', 0); } if (rf & 2) { ɵɵproperty('className', toggle ? A_1 + 'foo' : B_1);