|
|
|
| Written by Daniel P | |
| Tuesday, 09 January 2007 | |
|
While looking at ways to improve the speed of mpeg decoding in C#. I made the following little experiment.
//start timing
Console.WriteLine("native : {0}",timer1.Duration); Where ptr1, ptr2 are IntPtr "pointing" to native memory and arr1 and arr2 are 2D managed arrays of integers (timer1, timer2 are just objects of a simple wrapper around QueryPerformanceCounter). Since similar code occurs frequently in a video decoder, I was surprised to see that the native version runs 3.5 faster than the managed arrays. So I've modified the decoder in order to use "unsafe native" arrays. |
|
| Last Updated ( Tuesday, 13 February 2007 ) |
| < Prev | Next > |
|---|














