Speed comparation VB6 vs. C#
-
Hey everybody. I would like to know speed differences between vb6 and C#. How much C# is slower because of the CLR? Do you know some good web site where this is tested? Thanks in advance, Fedor
-
Hey everybody. I would like to know speed differences between vb6 and C#. How much C# is slower because of the CLR? Do you know some good web site where this is tested? Thanks in advance, Fedor
I don't think anyone has tested VB6 against C#. Test it yourself if you have any doubts. But, I think you'll find that the .NET CLR doesn't make C# or VB.NET slower than VB6. I think you'll find just the opposite.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Hey everybody. I would like to know speed differences between vb6 and C#. How much C# is slower because of the CLR? Do you know some good web site where this is tested? Thanks in advance, Fedor
I assume that you mean how much slower managed code is compared to unmanaged, as the CLR (common language runtime) is not very different from how VB6 works. VB6 also has a runtime library, the difference is just that it's specific for VB6 and not shared with any other language. Here[^] you can find a comparison between C#, VB6 and other languages. As you see, C# is roughly twice as fast as VB6 for simple operations. When using objects the difference grows substantially, as C# is roughly 100 times faster than VB6. The difference in performance when it comes to objects is largely due to the way that the managed code handles objects, so you see that managed code doesn't make C# slower, but in fact very much faster.
--- b { font-weight: normal; }
-
I assume that you mean how much slower managed code is compared to unmanaged, as the CLR (common language runtime) is not very different from how VB6 works. VB6 also has a runtime library, the difference is just that it's specific for VB6 and not shared with any other language. Here[^] you can find a comparison between C#, VB6 and other languages. As you see, C# is roughly twice as fast as VB6 for simple operations. When using objects the difference grows substantially, as C# is roughly 100 times faster than VB6. The difference in performance when it comes to objects is largely due to the way that the managed code handles objects, so you see that managed code doesn't make C# slower, but in fact very much faster.
--- b { font-weight: normal; }
Thank you for answers. It helped a lot! Regards, Fedor