Skip to content

Conversation

@iisat
Copy link
Owner

@iisat iisat commented Nov 12, 2018

No description provided.

Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

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

Оставил комментарии по коду

import cProfile
import functools

@functools.lru_cache()

Choose a reason for hiding this comment

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

Вариант с урока.
За практическую работу по профилированию засчитываю. Но это же не по условию ДЗ )))

#cProfile.run('maxfreq(10000000, 10000000)') 1 14.630 14.630 53.828 53.828 task1_l3t4.py:8(maxfreq)
#
#
# Вывод:

Choose a reason for hiding this comment

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

Отличная работа по всем направлениям. И код, и замеры, и выводы. Класс.

#cProfile.run('findsimple(1000)') 1 1.270 1.270 1.276 1.276 task2.py:31(findsimple)
#cProfile.run('findsimple(2000)') 1 4.554 4.554 4.567 4.567 task2.py:31(findsimple)
#
# Вывод - второй алгоритм показывает большую скорость при нахождении небольшого количества простых чисел,

Choose a reason for hiding this comment

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

Так же отлично.
А если лучше подобрать n в строке 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