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
KeyStrings class is an expensive class, instead KeyStrings should be part of JSContext as a field and must be shared as unique instance.
Avoid Pre Initialized Static fields as every access is a conditional access.
A new Script Instance must be derived from JSFunction with InvokeFunction overriden. And every keystring should be a field inside derived class. This is to avoid static access.
Saved assembly with classes provide better closure access instead of dynamic collection growing collection. Compiled classes offer better loading at runtime compared to dynamic methods. Every call to JSFunction is two indirection due to inherited InvokeFunction as well as calling delegate which again does null check, method pointer fetch and jumping to instruction.
We are not going to use C# code generation as it skips tail call optimization.
.NET 9 offers Portable Debug documents in the assembly that can remove need for extra IL to track stack traces.
KeyStringsclass is an expensive class, insteadKeyStringsshould be part ofJSContextas a field and must be shared as unique instance.JSFunctionwithInvokeFunctionoverriden. And every keystring should be a field inside derived class. This is to avoid static access.JSFunctionis two indirection due to inheritedInvokeFunctionas well as calling delegate which again does null check, method pointer fetch and jumping to instruction..NET 9offers Portable Debug documents in the assembly that can remove need for extra IL to track stack traces.