managed & unmanaged question

D

Dave

Hi, I'm writing a research simulation program and would like to write it in
c++. It should be as fast as possible and am not sure if it makes a
difference to use managed or unmanaged code. I will have to use it on more
than one computer but most of the time I will be using my own computer.
If, unmanaged code is faster, than what would I have to do to switch
between managed and unmanaged code? Can I just change a simple setting on
the new Microsoft Visual Studio? or would I just have to change the way I
declare variables? I'm not vary familiar with managed code.
thanks
dave
 
J

Jon Bell

Hi, I'm writing a research simulation program and would like to write it in
c++. It should be as fast as possible and am not sure if it makes a
difference to use managed or unmanaged code.

I've never heard of "managed code" in the context of standard C++. A
Google search leads me to believe that it might be a Microsoft thing, in
which case you'd be better off asking about it in one of the
microsoft.public.vc.* or comp.os.ms-windows.programmer.* groups.
 
D

Deming He

Dave said:
Hi, I'm writing a research simulation program and would like to write it in
c++. It should be as fast as possible and am not sure if it makes a
difference to use managed or unmanaged code. I will have to use it on more
than one computer but most of the time I will be using my own computer.
If, unmanaged code is faster, than what would I have to do to switch
between managed and unmanaged code? Can I just change a simple setting on
the new Microsoft Visual Studio? or would I just have to change the way I
declare variables? I'm not vary familiar with managed code.
thanks
dave
First of all, follow what Jon said.

After saying that, here's what I thought...and it's just my opinion.

Since your goal is doing simulation for research, you better off use any
language which is familiar to you. If you are familiar with C++, then use
C++; if C, then use C. Both should be fast enough for your purpose.

You don't need to switch between managed and unmanaged code since such a
switching always comes with a performance pernality. In Visual Studio .NET,
you can use either VB, C# if its speed satisfies your requirement.
Otherwise, use C++. As you know, use C++ in VS.NET, you can write managed
or unmanaged code as you wish.

Since you doing simulation, it must have lots of calculation instead of GUI
stuff, I assume about this. If this is the case, you may stay in C or C++.
If you do need lots graphic stuff, find some library of graphics.

You said "I will have to use it on more than one computer but most of the
time I will be using my own computer." Do you mean it will run
simultaneously on several computers? Do they need to communicate with each
other? Or will it just runs on computers of different OS? If it's the
latter case write the code and make sure it is portable across platforms.
Start from small and focus on one platform (your own computer) first.

Again, you goal is not mastering a new programming language but use it as a
tool for research. Thus, make sure the process of reaching the goal is
least-resistant. By saying that I mean using whichever language with which
you are familiar and comfortable, and it is fast enough for you.

Hope this help a bit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top