473,500 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Speed comparaison question

Hi all,

i need to choose a langage for porting my vb application to dot net 2.0
in november.

For some components, low-level components, i want to know if it can be
better to use specific .net language.

Basicaly, i want to know if
- managed c++ execution is faster than C# execution
- C# execution is faster than VB.Net execution

in fact, to know the speed classement between the languages using the
framework.net...
Thanks for your answers

Nicolas H.

Sep 7 '05 #1
9 1647
guy
i havent used managed c++ but there is zero difference between VB.NET and C#,
the msil produced is near enough identical.
There are some performance advantages (!) in using VB.NET when it comes to
string handling etc, the VB.NET compiler can optimize Mid rather than using
substring but the end result is trivial.
choice of langauge is more a case of what you are used to, if you come from
a c++/java background go c#, if you are a VB person stick with vb.net

hth

guy

"ni*************@motorola.com" wrote:
Hi all,

i need to choose a langage for porting my vb application to dot net 2.0
in november.

For some components, low-level components, i want to know if it can be
better to use specific .net language.

Basicaly, i want to know if
- managed c++ execution is faster than C# execution
- C# execution is faster than VB.Net execution

in fact, to know the speed classement between the languages using the
framework.net...
Thanks for your answers

Nicolas H.

Sep 7 '05 #2
ok, thanks a lot for your answer

I'm really interested with speed comparaison between managed C++ and C#
for example

i don't really think that managed C++ produced the same msil

If someone can answer this question, that would be great

thanks in advance

Nicolas H.

Sep 7 '05 #3
guy <gu*@discussions.microsoft.com> wrote:
i havent used managed c++ but there is zero difference between VB.NET and C#,
the msil produced is near enough identical.
No, it's not. There are a few cases where they generate different
enough IL that the JIT can inline the C# version but not the VB.NET
version. If you happen to be unlucky, that *could* make a significant
difference. Most of the time it wouldn't, but
There are some performance advantages (!) in using VB.NET when it comes to
string handling etc, the VB.NET compiler can optimize Mid rather than using
substring but the end result is trivial.


Do you have any examples of this? I believe Mid uses Substring
internally, so I don't see how it could be faster.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Sep 7 '05 #4
Jon,

No, it's not. There are a few cases where they generate different
enough IL that the JIT can inline the C# version but not the VB.NET
version. If you happen to be unlucky, that *could* make a significant
difference. Most of the time it wouldn't, but

Are you *100%* sure that a kind of this cannot be as well for VB.Net to C#?

Cor
Sep 7 '05 #5
Cor Ligthert [MVP] <no************@planet.nl> wrote:
No, it's not. There are a few cases where they generate different
enough IL that the JIT can inline the C# version but not the VB.NET
version. If you happen to be unlucky, that *could* make a significant
difference. Most of the time it wouldn't, but
Are you *100%* sure that a kind of this cannot be as well for VB.Net to C#?


While I don't know every bit of IL that can be generated, I've only
heard about it (and tested it for myself) with the C# compiler
generating the leaner code (in terms of bytes of IL; there are more IL
instructions, but they're shorter). I also believe VB.NET adds NOPs in
when it doesn't need to in some situations. I should add that all this
is with 1.1 - the 2.0 JIT probably has different inlining rules, and
the compilers may well be generating different code anyway.

I'd be happy to be shown an example where the VB.NET IL is faster, of
course. I suspect that if they exist I'd have heard about them, but
that doesn't mean they definitely don't exist. (Note that my post
didn't claim they didn't exist, either.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Sep 7 '05 #6
this article is interesting
http://www.codeguru.com/columns/Kate/article.php/c5647/

but they don't talk about managed c++, which is my interest

Nicolas H.

Sep 8 '05 #7
Nicolas,

This is something done in long arguing in more dotnet newsgroups, where
often Jon (and Jay) and me were involved, while Jon mostly and I sometimes
did some testing.

If it is about constants, than concatinating is as we have seen quicker.

Be as well aware that running in the IDE can give an other performance
result than running it as exe.

I hope this gives an idea

Cor
Sep 8 '05 #8
<ni*************@motorola.com> wrote:
this article is interesting
http://www.codeguru.com/columns/Kate/article.php/c5647/

but they don't talk about managed c++, which is my interest


Shame it also misses the point of string.Concat, which is that it can
concatenate *multiple* strings in one call. Yet another article on
string performance which states a generality on the basis of one bad
usage...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Sep 8 '05 #9
I suppose that managed c++ is the same speed when CLR objects are used,
but when it has native code, it should be as fast as before.

do you think the same / it's right ?
Nicolas H.

Sep 9 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
22998
by: Yang Li Ke | last post by:
Hi guys, Is it possible to know the internet speed of the visitors with php? Thanx -- Yang
34
2435
by: Jacek Generowicz | last post by:
I have a program in which I make very good use of a memoizer: def memoize(callable): cache = {} def proxy(*args): try: return cache except KeyError: return cache.setdefault(args,...
28
2562
by: Maboroshi | last post by:
Hi I am fairly new to programming but not as such that I am a total beginner From what I understand C and C++ are faster languages than Python. Is this because of Pythons ability to operate on...
11
2714
by: Fred Bennett | last post by:
I have a simulation project in which data can naturally be held in structures for processing. There are calls to multiple functions involved. Execution speed is an issue. Do I take a big hit for...
23
2058
by: Rogers | last post by:
I want to compare strings of numbers that have a circular boundary condition. This means that the string is arranged in a loop without an end-of-string. The comparaison of two strings now...
11
9164
by: Sezai YILMAZ | last post by:
Hello I need high throughput while inserting into PostgreSQL. Because of that I did some PostgreSQL insert performance tests. ------------------------------------------------------------ --...
9
328
by: nicolas.hilaire | last post by:
Hi all, i need to choose a langage for porting my vb application to dot net 2.0 in november. For some components, low-level components, i want to know if it can be better to use specific .net...
45
2840
by: charles.lobo | last post by:
Hi, I have recently begun using templates in C++ and have found it to be quite useful. However, hearing stories of code bloat and assorted problems I decided to write a couple of small programs...
4
12825
by: halimunan | last post by:
Hello all, I have a question, how do i measure the download/upload speed... as if download rate, upload rate or kbps transfer rate. i want to do my own windows application using C# to measure the...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.