You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With typescript 4.4.2, the node.ts is compiled to:
exportabstractclassNodeimplementsHashObject{// this is to save an extra variable to check if a node has a root or noth0=nullasunknownasnumber;h1=0;h2=0;h3=0;h4=0;h5=0;h6=0;h7=0;abstractroot: Uint8Array;abstractrootHashObject: HashObject;abstractleft: Node;abstractright: Node;applyHash(root: HashObject): void{
this makes the performance test runs >10x slower as below
note the instance_members_initializer time, we don't have that with current version 4.2.3 which compiles node.ts to
classNode{constructor(){// this is to save an extra variable to check if a node has a root or notthis.h0=null;this.h1=0;this.h2=0;this.h3=0;this.h4=0;this.h5=0;this.h6=0;this.h7=0;}applyHash(root){this.h0=root.h0;this.h1=root.h1;this.h2=root.h2;this.h3=root.h3;this.h4=root.h4;this.h5=root.h5;this.h6=root.h6;this.h7=root.h7;}}
With typescript 4.4.2, the
node.ts
is compiled to:this makes the performance test runs >10x slower as below
this is the profile with typescript 4.4.2
0908_monorepo.cpuprofile.zip
note the
instance_members_initializer
time, we don't have that with current version 4.2.3 which compilesnode.ts
tothe profile with typescript 4.2.3
0908_separate_repo_ssz.cpuprofile.zip
The text was updated successfully, but these errors were encountered: