Skip to content

Lesson4 - #4

Open
iisat wants to merge 1 commit into
lesson3from
lesson4
Open

iisat wants to merge 1 commit into
lesson3from
lesson4

Conversation

@iisat

@iisat iisat commented Nov 12, 2018

Copy link
Copy Markdown
Owner

No description provided.

@Dzhoker1 Dzhoker1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread Lesson4/lesson.py
import cProfile
import functools

@functools.lru_cache()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread Lesson4/task2.py
#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)
#
# Вывод - второй алгоритм показывает большую скорость при нахождении небольшого количества простых чисел,

Copy link
Copy Markdown

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.

2 participants