Click here to Skip to main content
15,890,506 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Array handling Pin
DavidNohejl26-May-05 12:02
DavidNohejl26-May-05 12:02 
GeneralRe: Array handling Pin
sarabjs27-May-05 8:44
sarabjs27-May-05 8:44 
GeneralRe: Array handling Pin
DavidNohejl28-May-05 6:32
DavidNohejl28-May-05 6:32 
GeneralRe: Array handling Pin
sarabjs30-May-05 7:54
sarabjs30-May-05 7:54 
GeneralRe: Array handling Pin
Robert Rohde27-May-05 5:41
Robert Rohde27-May-05 5:41 
GeneralRe: Array handling Pin
sarabjs27-May-05 9:26
sarabjs27-May-05 9:26 
GeneralRe: Array handling Pin
sarabjs27-May-05 9:48
sarabjs27-May-05 9:48 
GeneralRe: Array handling Pin
Robert Rohde28-May-05 0:40
Robert Rohde28-May-05 0:40 
Hmmmm... Ive tested exactly the code you posted and on my machine the relese mode version cut down the time needed to nearly the half. Have you tested it within VS or standalone?
Check that the 'optimize' flag is set to true, 'check for arithmetic overflow' to false and 'generate debug info' also to false.

But I think I have found something to increase the speed of the algorithm itsself:
If I get it right you loop through all columns and in that loop through all rows. Then you sum up all values within this window. One big part is summing up the values within this window. If you imagine all those windows in a chart you can imagine that they all overlap each other. Thus you are summing up the same values some dozens times. My suggestion would be to sum up the values for the needed rows for all columns at once before processing a line. This way you dont have to sum all values within the window but only the prepared column sums. The same is probably possible for the variance.

I hope this was somehow clear. If not I'll probably implement it myself when I have some minutes free Smile | :) .

Btw: Do You only work with integers? Are those matrix values calculated for only one color chanel (red, green , blue) or is really the complete RGB-value stored? If latter then summing up those values could easily overflow an integer variable Confused | :confused:
GeneralRe: Array handling Pin
sarabjs30-May-05 7:44
sarabjs30-May-05 7:44 
GeneralRe: Array handling Pin
Robert Rohde30-May-05 8:31
Robert Rohde30-May-05 8:31 
GeneralRe: Array handling Pin
sarabjs30-May-05 10:18
sarabjs30-May-05 10:18 
GeneralRe: Array handling Pin
Robert Rohde30-May-05 18:53
Robert Rohde30-May-05 18:53 
GeneralRe: Array handling Pin
sarabjs31-May-05 5:12
sarabjs31-May-05 5:12 
GeneralRe: Array handling Pin
Robert Rohde31-May-05 8:07
Robert Rohde31-May-05 8:07 
GeneralRe: Array handling Pin
sarabjs31-May-05 9:55
sarabjs31-May-05 9:55 
GeneralRe: Array handling Pin
DavidNohejl28-May-05 6:21
DavidNohejl28-May-05 6:21 
GeneralRe: Array handling Pin
Robert Rohde28-May-05 6:37
Robert Rohde28-May-05 6:37 
GeneralRe: Array handling Pin
DavidNohejl28-May-05 6:57
DavidNohejl28-May-05 6:57 
GeneralRe: Array handling Pin
Robert Rohde28-May-05 9:46
Robert Rohde28-May-05 9:46 
GeneralRe: Array handling Pin
DavidNohejl28-May-05 9:51
DavidNohejl28-May-05 9:51 
GeneralRe: Array handling Pin
sarabjs30-May-05 7:57
sarabjs30-May-05 7:57 
GeneralWhen to use sockets and when to use remoting Pin
G.Ringbom25-May-05 0:58
G.Ringbom25-May-05 0:58 
GeneralRe: When to use sockets and when to use remoting Pin
Nish Nishant25-May-05 1:31
sitebuilderNish Nishant25-May-05 1:31 
GeneralDetermine if .NET Framework is installed Pin
LiamD25-May-05 0:31
LiamD25-May-05 0:31 
GeneralRe: Determine if .NET Framework is installed Pin
Nish Nishant25-May-05 1:29
sitebuilderNish Nishant25-May-05 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.