-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dumpnef performance #1201
dumpnef performance #1201
Conversation
} | ||
} | ||
} | ||
if (a < script.Length) | ||
dumpnef += $"{WriteInstruction(a, script.GetInstruction(a), script.GetInstructionAddressPadding(), nef.Tokens)}\n"; | ||
dumpnef.Append($"{WriteInstruction(a, script.GetInstruction(a), addressPadding, nef.Tokens)}\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use AppendLine and remove the \n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. WILCO in 24 hours
what is the performance improvement |
string addressPadding enumerates instructions only once instead of many times |
I mean what is the perforamcne after this pr. |
< 1 second. Negligible time compared to compilation. |
stringbuilder it's much faster than string concat |
I spent almost 1 minute in dumpnef for a huge contract reaching instruction address of 22000. So I profiled dumpnef and made some optimizations...