Active Scripting in C# – Which is faster, VBScript or JScript?

Just did some really basic poor-man’s performance measurements regarding the comparison of using VBScript versus using JScript.

I did write a small Microsoft .NET Framework 2.0 Windows Forms application in C#.

The application uses an Active Scripting host and runs two small scripts, one being in VBScript (VB, VBS, Visual Basic Script) and one being written in JScript (JS, Java Script, JavaScript):

The results were rather clear:

VBScript was always faster than JScript. I counted not only the running of the script, but the whole process of creating the scripting engine, running the script and shutting down the scripting engine again.

Of course this test is probably rather imprecise and kind of naive, but it gave me a quick overview , that VBScript is always 1/3rd faster than JScript.

I tried this also on a PC with Internet Explorer 9 (IE9) Beta installed, in the hope that the new JScript engine of IE9 influences the one being used in Active Scripting, too. But I was wrong. The performance was similar to the one on a PC with IE8.

You can download the example application from here.

Ein Gedanke zu „Active Scripting in C# – Which is faster, VBScript or JScript?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.