Re: profiling in pyrex
Claudio Freire <[email protected]> Wed, 1 Dec 2010 11:40:34 -0300
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
--===============0456029851== Content-Type: multipart/alternative; boundary=20cf3054ab61ba216704965a49ca --20cf3054ab61ba216704965a49ca Content-Type: text/plain; charset=ISO-8859-1 ---------- Forwarded message ---------- > From: Stefan Behnel <[email protected]> > To: [email protected] > Date: Wed, 01 Dec 2010 08:41:56 +0100 > Subject: Re: [Pyrex] profiling in pyrex > Mihai Badoiu wrote: > >> what is the best way to profile code written in pyrex? >> > > Cython has Python profiling support. You can compile a module with > profiling enabled, and it will trace function calls into cProfile, even > calls to cdef functions. > > http://docs.cython.org/src/tutorial/profiling_tutorial.html > > If you need more low-level profiling data, use valgrind's callgrind. It has > a great visualisation tool available that is called kcachegrind. > > Stefan > I use oprofile, which doesn't properly report python code, but catches pyrex code without issue (since it's like any other C code). --20cf3054ab61ba216704965a49ca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ---------- Forwarded message ----------<br><div class=3D"gmail_quote"><bloc= kquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, = 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">From:=A0Stefan Behnel = <<a href=3D"mailto:[email protected]">[email protected]</a>><br> To:=A0<a href=3D"mailto:[email protected]">[email protected]</a= ><br>Date:=A0Wed, 01 Dec 2010 08:41:56 +0100<br>Subject:=A0Re: [Pyrex] prof= iling in pyrex<br>Mihai Badoiu wrote:<br> <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, = 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> what is the best way to profile code written in pyrex?<br> </blockquote> <br> Cython has Python profiling support. You can compile a module with profilin= g enabled, and it will trace function calls into cProfile, even calls to cd= ef functions.<br> <br> <a href=3D"http://docs.cython.org/src/tutorial/profiling_tutorial.html" tar= get=3D"_blank">http://docs.cython.org/src/tutorial/profiling_tutorial.html<= /a><br> <br> If you need more low-level profiling data, use valgrind's callgrind. It= has a great visualisation tool available that is called kcachegrind.<br> <br> Stefan<br></blockquote><div><br></div></div>I use oprofile, which doesn'= ;t properly report python code, but catches pyrex code without issue (since= it's like any other C code).<br><br> --20cf3054ab61ba216704965a49ca-- --===============0456029851== Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ Pyrex mailing list [email protected] http://lists.copyleft.no/mailman/listinfo/pyrex --===============0456029851==--