how much faster are unmanaged vs. managed arrays? (.net 2.0 framework)
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>
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] - 03 Oct 2007 15:05 GMT
> 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.
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.
> If you'll provide more background to your question it will be possible to
> give more concrete answer.
[quoted text clipped - 6 lines]
> b> how much faster are unmanaged vs. managed arrays? (.net 2.0
> b> framework)