Speed up Matrix Addition in C#

前端 未结 15 1156
北荒
北荒 2021-02-05 22:48

I\'d like to optimize this piece of code :

public void PopulatePixelValueMatrices(GenericImage image,int Width, int Height)
{            
        for (int x = 0;         


        
15条回答
  •  有刺的猬
    2021-02-05 23:12

    Sometimes doing things in native C#, even unsafe calls, is just slower than using methods that have already been optimized.

    No results guaranteed, but you may want to investigate the System.Windows.Media.Imaging name space and look at your whole problem in a different way.

提交回复
热议问题