I'm thinking of throwing in some results for PyPy, ShedSkin and Cython
to show "here's what you can achieve after you've done your
profiling". But...I'm not sure how to go about profiling the ShedSkin
C++ code. Has anyone tried?
I'm guessing that something like cachegrind might do the job (though
I've never used the *grind toolset). Is there an easy tool that shows
the time spent on each line for the generated C++, preferably linked
to the annotated Python source?
Ian.
--
Ian Ozsvald (A.I. researcher, screencaster)
i...@IanOzsvald.com
http://IanOzsvald.com
http://SocialTiesApp.com/
http://MorConsulting.com/
http://blog.AICookbook.com/
http://TheScreencastingHandbook.com
http://FivePoundApp.com/
http://twitter.com/IanOzsvald
2011/5/3 Ian Ozsvald <i...@ianozsvald.com>:
> In a week I'm giving a show-n-tell to the London Financial Python
> Usergroup on profiling using RunSnake and line_profiler. This is a
> test for a bit of my EuroPython tutorial.
>
> I'm thinking of throwing in some results for PyPy, ShedSkin and Cython
> to show "here's what you can achieve after you've done your
> profiling". But...I'm not sure how to go about profiling the ShedSkin
> C++ code. Has anyone tried?
>
> I'm guessing that something like cachegrind might do the job (though
> I've never used the *grind toolset). Is there an easy tool that shows
> the time spent on each line for the generated C++, preferably linked
> to the annotated Python source?
Try callgrind (profiler) + kcachegrind (profiling's output
visualizer), it rocks :-)
Linking the results to the Python source would not be that easy —
though it's most of the time straightforward for who knows the code.
Please note that you may encounter some problems with the valgrind
suite, because of boehm gc…
Best regards,
--
Jérémie
> In a week I'm giving a show-n-tell to the London Financial Python
> Usergroup on profiling using RunSnake and line_profiler. This is a
> test for a bit of my EuroPython tutorial.
>
> I'm thinking of throwing in some results for PyPy, ShedSkin and Cython
> to show "here's what you can achieve after you've done your
> profiling". But...I'm not sure how to go about profiling the ShedSkin
> C++ code. Has anyone tried?
>
> I'm guessing that something like cachegrind might do the job (though
> I've never used the *grind toolset). Is there an easy tool that shows
> the time spent on each line for the generated C++, preferably linked
> to the annotated Python source?
Hi Ian,
I usually compile with "-g" or make the _debug target and watch the
profile with gprof, e.g.:
shedskin test.py
make test_debug
gprof ./test_debug | less
Thomas
--
shedskin test.py
make test_debug
gprof ./test_debug | less