Groups | Blog | Home
all groups > dotnet performance > september 2007 >

dotnet performance : c++ unmanaged vs managed arrays


buu
9/28/2007 12:00:00 AM
how much faster are unmanaged vs. managed arrays? (.net 2.0 framework)

Michael Nemtsev, MVP
9/29/2007 11:26:17 AM
Hello buu,

What exactly do u mean?
Any sample you want to compare?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


b> how much faster are unmanaged vs. managed arrays? (.net 2.0
b> framework)
b>

Vadym Stetsiak
10/3/2007 1:16:59 AM
Hello, buu!

It depends what you're doing with them.
for unmanged arrays allocation will take more time then for managed ones.
Iteration, however, can be faster for unmanaged ones.

If you'll provide more background to your question it will be possible to
give more concrete answer.
--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote on Fri, 28 Sep 2007 08:02:53 +0200:

b> how much faster are unmanaged vs. managed arrays? (.net 2.0
b> framework)


Ben Voigt [C++ MVP]
10/3/2007 9:05:58 AM

[quoted text, click to view]

Not so much... managed arrays are stored sequentially, access is equally
fast. But managed arrays are subject to being moved by the GC, so you can't
pass them to unmanaged code without first making a copy or pinning.

[quoted text, click to view]

AddThis Social Bookmark Button