Can you more explain why for .NET application calling by name to be negligible?
Invoking a VBScript function from .NET is relatively expensive, as the ClearScript and COM interop layers incur a lot of overhead. Adding a string lookup shouldn't affect it significantly. This is all speculation, of course, until we compare some actual performance measurements. We'll take a closer look at this.
About thread-safe I know, that a reason why in our legacy code there is a logic that check thread id and clone scripter in case of calling from a different thread. Is there some work around in ClearScript?
No, ClearScript throws an exception if you attempt to use a
VBScriptEngineinstance from the wrong thread, but nothing stops you from implementing an engine cloning scheme like the one in your legacy application.