Hacker GitHub

← All repos

rkern/line_profiler

View on GitHub ↗ ★ 3,581 Python archived

(OLD REPO) Line-by-line profiling for Python - Current repo ->

6 mentions on Hacker News by 6 people: 1 story, 5 comments · first 2015-07-28 · latest 2020-01-01

Mentions per year 6 mentions · busiest year 2017 (3)
20082026
  1. Should also use kernprof - https://github.com/rkern/line_profiler - to see which lines in that function take the most time. Oddly, none of the techniques listed would help that slow_program.py function since kernprof says that 99.8% of the…
    comment by eesmith · 2020-01-01 · in Making Python Programs Blazingly Fast
  2. …[1] extension for it: https://github.com/dmclain/django-debug-toolbar-line-profile... [1] https://github.com/rkern/line_profiler
  3. ▲ 1
    Rkern/line_profiler: Line-by-line profiling for Python
    story by hamid914 · 2017-06-15 · 0 comments
  4. I really like the simplicity of your solution, but you might be interested in kernprof: https://github.com/rkern/line_profiler It seems to be the nearly-canonical line-by-line profiler for Python, or was some years ago.
  5. …you can end up with even slower performance than CPython -- I know because I've done it! [1] https://github.com/rkern/line_profiler#id7
  6. I'm a fan of line_profiler: https://github.com/rkern/line_profiler % cat > l.py @profile def slow_func(): for i in xrange(1048576): continue return -1 @profile def fast_func(): for i in xrange(10): continue return -1 @profile def…
    comment by sown · 2015-07-28 · in Profiling in Python