Skip to content

Conversation

@dkaznacheev
Copy link
Owner

No description provided.

Copy link

@dzharkov dzharkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Итого: 8/10

long endSingleTime = System.nanoTime();
long startMultiTime = System.nanoTime();
try {
hashSingleThread(root);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Извиняюсь, за занудство, но тут не тот метод явно.
С одной стороны это простая человеческая невнимательность и можно было бы понять, но это показывает, что вы не задались вопросом, почему разницы по времени нет. -1

List<HashRecursiveTask> tasks = new LinkedList<>();
for (File content : contents) {
HashRecursiveTask task = new HashRecursiveTask(content);
task.fork();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В этот момент таска уходит на дефолтный fork-join pool. А это вряд ли то, что здесь ожидалось, учитывая, что выше вы создаете свой тред-пул. -1

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Беру свои слова назад. Был неправ

@dzharkov
Copy link

dzharkov commented May 2, 2018

Итого: 9/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants