How can I make my program run faster: does the thread use the solution?

I wrote a program that creates a huge search tree. Since my tree is too large, I expected my program to use more than 40% of the processor. instead, my program uses no more than 10% of the processor, even if it runs with high priority.

If threads will use more processor during parallel operation, please let me know this; I can split my program into threads, I really need to reduce the search time.

Thank!

+3
source share
5 answers

instead, my program uses no more than 10% of the processor

10%, - 10% - , 10 1 100%.

, 100%, , . , - IO/network bound IO . "", ? , , , , /, .

1 , , , .

+2

, - . , . - , , , , . , , , node. - (AVL, red/black, splay, AA ..), , .

. , (, / O (lg n)), , , , . parallelism.

+1

, 10 , , , , / - .

.

(, ), , , .

+1

, , .

+1
0

Source: https://habr.com/ru/post/1787218/


All Articles