cesarnda wrote:
> why the line:
> 
> def primes(int kmax):
> 
> is in yellow?


If you click on the line, you can see the actual C code that Cython 
generated for you.  Doing that, you'll notice that there are quite a few 
more python calls stemming from yellow lines than the white lines.  The 
more yellow a line is, the slower it will probably run because it is 
doing more python stuff than just straight C stuff.  Some python stuff 
is unavoidable, though, like the def statement above.

Note that the coloring of the lines is heuristic; it's not a guarantee 
that those lines are the ones that are running slowly.  But it does help 
quite a bit if you want to speed up your code: make sure that the inner 
loops don't have very much yellow in them.

Personally, I think the coloring of the lines and the ability to click 
on them is one of the neatest features about developing cython in the 
notebook.

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to