Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2007

Tip: Looking for answers? Try searching our database.

Differences between Visual C++ and Visual C++.Net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LifeStory - 04 Aug 2007 13:03 GMT
Hi all,

is there a differene between VC.Net and VC? (performance issues not the
syntax) and which is more efficient for programs that need very effecient
memry utilizations and multithreading applications?

Thanks,
nana
Carl Daniel [VC++ MVP] - 05 Aug 2007 05:27 GMT
> Hi all,
>
> is there a differene between VC.Net and VC? (performance issues not the
> syntax) and which is more efficient for programs that need very effecient
> memry utilizations and multithreading applications?

It's not clear what you're asking, since there are no products named "VC" or
"VC.NET".  Are you asking about differences between Visual C++ (2002? 2003?
2005? 2008?) when producing native code versus managed code?  Or is it
something else?

Efficiency is tricky - you need to be very specific about what's important.
For example, allocating memory is many times more efficient in managed code
than in unmanaged code, but there are other trade-offs (memory related and
otherwise) that may make managed code slower for a particular application.

-cd
Ben Voigt [C++ MVP] - 06 Aug 2007 17:50 GMT
> Hi all,
>
> is there a differene between VC.Net and VC? (performance issues not the
> syntax) and which is more efficient for programs that need very effecient
> memry utilizations and multithreading applications?

Default memory allocator is a bottleneck for native C++ code, .NET's garbage
collector does better.  But .NET cannot even come close to the performance
using a well-designed allocator like hoard.
http://www.hoard.org/

> Thanks,
> nana
Carl Daniel [VC++ MVP] - 09 Aug 2007 21:17 GMT
> Default memory allocator is a bottleneck for native C++ code, .NET's
> garbage collector does better.  But .NET cannot even come close to the
> performance using a well-designed allocator like hoard.
> http://www.hoard.org/

Can you point to any studies that justify that statement?  The built-in
allocqator for VC++ is certainly no winner on speed, but for certain
workloads, I'd expect the .NET allocator to beat the best written non-GC
allocator.  Likewise, for certain workloads, I'd expect a well written
non-GC allocator to kick the pants off of the .NET allocator.  Which is
better depends on your application.

-cd
Ben Voigt [C++ MVP] - 09 Aug 2007 21:26 GMT
>> Default memory allocator is a bottleneck for native C++ code, .NET's
>> garbage collector does better.  But .NET cannot even come close to the
[quoted text clipped - 7 lines]
> non-GC allocator to kick the pants off of the .NET allocator.  Which is
> better depends on your application.

The .NET allocator is still a shared allocator, with all the performance hit
associated with contention.  Take a look at the hoard feature list.  It
accounts for and tries to automatically improve things I'd never even
considered, like false cache-line sharing.  The .NET allocator, though it
benefits from the advantages of GC, simply isn't in the same class.
Probably some gc-based allocator could beat hoard on the workloads you speak
of, but I don't think the .NET one is sophisticated enough to compete.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.