-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homework №2 #102
base: master
Are you sure you want to change the base?
homework №2 #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
По коду всё чётко сделано, по замерам/профилированию см комменты
@@ -0,0 +1,104 @@ | |||
За основу взял оптимизированный по CPU код из первого задания |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
Первый отчет memory profiler | ||
``` | ||
MEMORY USAGE: 122 MB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не корректно смешивать замеры и профилирование
Само присутствие memory_profiler увеличивает потребление памяти
Правило: Замеры отдельно - профилирование отдельно
 | ||
Пик потребления не достигает даже 1мб, пробовал по разному запускать, результат не меняется, всегда пик 3.1kb, то же самое происходит и с heaptrack | ||
 | ||
Но простой прогон с puts в конце показывает |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, см коммент выше
``` | ||
MEMORY USAGE: 30 MB | ||
``` | ||
Программа теперь выполняется примерно за 9.6 секунд |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 быстро и с минимальным потреблением памяти 👍
Пик потребления не достигает даже 1мб, пробовал по разному запускать, результат не меняется, всегда пик 3.1kb, то же самое происходит и с heaptrack | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возможно программа не запускается / либо что-то не работает
File.foreach(ENV['DATA_FILE'] || filename || 'data.txt', chomp: true) do |line| | ||
column_number = 0 | ||
|
||
line.split(',') do |column_value| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Плюсую split with block
No description provided.