Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: Code optimization Pin
Eddy Vluggen18-Oct-09 2:33
professionalEddy Vluggen18-Oct-09 2:33 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:28
tvbarnard18-Oct-09 3:28 
GeneralRe: Code optimization Pin
Eddy Vluggen18-Oct-09 3:37
professionalEddy Vluggen18-Oct-09 3:37 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:52
tvbarnard18-Oct-09 3:52 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 4:21
sitebuilderLuc Pattyn19-Oct-09 4:21 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 5:09
tvbarnard19-Oct-09 5:09 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 5:37
sitebuilderLuc Pattyn19-Oct-09 5:37 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 6:02
tvbarnard19-Oct-09 6:02 
Wow, that's a big help!

Unfortunately since I've made so many versions of my code, some of the stuff you've said I've already done (like using the int's i.s.o. doubles).

What you've really helped with is using short's i.s.o. int's (hope this makes significant difference)

Questions:

1. The problem I have with merging the pos/neg points, is that those are index references to the image data (in other words to the pixels). I can't have a negative reference to an array... eg. image.data[-4] would be wrong. Unless you maybe meant something else?

2. Lol, you're right about that second last point. I can't merge my data, since I have for example a "errorRate (double)" associated with each classifier. Would an array[] of classifiers be faster than a List<> of classifiers?

3. Do you see any safe way of implementing parallelism? I've tried Parallel.For(0, bound, x=>{}) instead of the foreach statements for each of the respective loops, but I always get corrupted results. Could you expand on "or better yet have a counter for each thread, then accumulate them when all have finished"?

Oh, and a last point, each of the 500 iterations are called at independent times, so there's nothing in common between them.

tvb

GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 6:40
sitebuilderLuc Pattyn19-Oct-09 6:40 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 6:55
tvbarnard19-Oct-09 6:55 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 7:06
sitebuilderLuc Pattyn19-Oct-09 7:06 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 7:41
tvbarnard19-Oct-09 7:41 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 12:45
sitebuilderLuc Pattyn19-Oct-09 12:45 
AnswerRe: Code optimization Pin
tvbarnard20-Oct-09 1:33
tvbarnard20-Oct-09 1:33 
GeneralRe: Code optimization Pin
Luc Pattyn20-Oct-09 1:40
sitebuilderLuc Pattyn20-Oct-09 1:40 
GeneralRe: Code optimization Pin
tvbarnard20-Oct-09 6:50
tvbarnard20-Oct-09 6:50 
GeneralRe: Code optimization Pin
Luc Pattyn20-Oct-09 6:53
sitebuilderLuc Pattyn20-Oct-09 6:53 
GeneralRe: Code optimization Pin
tvbarnard20-Oct-09 6:55
tvbarnard20-Oct-09 6:55 
GeneralRe: Code optimization Pin
Luc Pattyn18-Oct-09 11:24
sitebuilderLuc Pattyn18-Oct-09 11:24 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 22:37
tvbarnard18-Oct-09 22:37 
GeneralRe: Code optimization Pin
Luc Pattyn19-Oct-09 4:27
sitebuilderLuc Pattyn19-Oct-09 4:27 
GeneralRe: Code optimization Pin
tvbarnard19-Oct-09 4:42
tvbarnard19-Oct-09 4:42 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:31
tvbarnard18-Oct-09 3:31 
AnswerRe: Code optimization Pin
Not Active18-Oct-09 3:30
mentorNot Active18-Oct-09 3:30 
GeneralRe: Code optimization Pin
tvbarnard18-Oct-09 3:36
tvbarnard18-Oct-09 3:36 

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.