Click here to Skip to main content
16,005,120 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: BUBBLE SORT Pin
Mycroft Holmes9-Nov-09 21:19
professionalMycroft Holmes9-Nov-09 21:19 
GeneralRe: BUBBLE SORT Pin
nlarson119-Nov-09 17:21
nlarson119-Nov-09 17:21 
QuestionNow can i make a lot of threads of a same method? Pin
anonimo99999-Nov-09 11:48
anonimo99999-Nov-09 11:48 
AnswerRe: Now can i make a lot of threads of a same method? Pin
Dave Kreskowiak9-Nov-09 12:05
mveDave Kreskowiak9-Nov-09 12:05 
GeneralRe: Now can i make a lot of threads of a same method? Pin
anonimo99999-Nov-09 12:29
anonimo99999-Nov-09 12:29 
GeneralRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 12:43
sitebuilderLuc Pattyn9-Nov-09 12:43 
GeneralRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 13:23
sitebuilderLuc Pattyn9-Nov-09 13:23 
AnswerRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 12:38
sitebuilderLuc Pattyn9-Nov-09 12:38 
Hi,

multi-threading will increase overall performance as long as:
1) you have idle cores (e.g. your system is a quad core and there mainly is a single app, which isn't multi-threaded at all)
2) or your active cores are not fully loaded because a lot of time is spent waiting on something (disk I/O, network I/O, etc).

You can check both by looking at the performance pane of Task Manager while your current app executes. If the CPU load is near 100%, threading won't help you at all. If it is near 50% on a dual-core, at best threading will double the speed. etc.

Keep in mind that multi-threading has its drawbacks too:
- an N-core system is not N times as powerful as a single-core, because a lot of resources are shared (main memory, some of the cache, all input/output devices, ...).
- thread synchronization (locks, mutexes, whatever) come at a cost.

Conclusion:
- if your CPU load is way below 100%/N for an N-core system, it is waiting a lot, and more threads may (or may not) remedy that;
- if your CPU has N cores, multi-threading (up to N) may or may not provide a speed increase up to N.
- most often the first thread you add is the biggest step forward.

Smile | :)

Luc Pattyn

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


QuestionForm Sound. Pin
thebiostyle9-Nov-09 11:11
thebiostyle9-Nov-09 11:11 
AnswerRe: Form Sound. Pin
Dave Kreskowiak9-Nov-09 12:00
mveDave Kreskowiak9-Nov-09 12:00 
GeneralRe: Form Sound. Pin
thebiostyle9-Nov-09 12:18
thebiostyle9-Nov-09 12:18 
GeneralRe: Form Sound. Pin
EliottA10-Nov-09 2:06
EliottA10-Nov-09 2:06 
GeneralRe: Form Sound. Pin
Dave Kreskowiak10-Nov-09 3:31
mveDave Kreskowiak10-Nov-09 3:31 
QuestionKeyPress Sounds... Pin
thebiostyle9-Nov-09 10:00
thebiostyle9-Nov-09 10:00 
AnswerRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 10:25
mveDave Kreskowiak9-Nov-09 10:25 
GeneralRe: KeyPress Sounds... Pin
thebiostyle9-Nov-09 10:32
thebiostyle9-Nov-09 10:32 
GeneralRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 11:59
mveDave Kreskowiak9-Nov-09 11:59 
GeneralRe: KeyPress Sounds... Pin
thebiostyle9-Nov-09 12:19
thebiostyle9-Nov-09 12:19 
GeneralRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 15:39
mveDave Kreskowiak9-Nov-09 15:39 
AnswerRe: KeyPress Sounds... Pin
Eddy Vluggen10-Nov-09 5:08
professionalEddy Vluggen10-Nov-09 5:08 
QuestionNull Entries in SQL database. Pin
jeshra2799-Nov-09 7:30
jeshra2799-Nov-09 7:30 
AnswerRe: Null Entries in SQL database. Pin
The Man from U.N.C.L.E.9-Nov-09 7:42
The Man from U.N.C.L.E.9-Nov-09 7:42 
AnswerRe: Null Entries in SQL database. Pin
Shameel9-Nov-09 7:54
professionalShameel9-Nov-09 7:54 
GeneralRe: Null Entries in SQL database. Pin
jeshra2799-Nov-09 18:50
jeshra2799-Nov-09 18:50 
GeneralRe: Null Entries in SQL database. Pin
Shameel10-Nov-09 2:10
professionalShameel10-Nov-09 2:10 

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.