[sage-support] Re: Cython help

2009-04-24 Thread Mike Hansen

Hi Dylan,

On Fri, Apr 24, 2009 at 12:47 PM, drupel dylanru...@gmail.com wrote:

 Hi all,
 I am new to Sage and I don't quite understand how to convert my code
 to cython code to speed up my program.  I am doing a lot of symbolic
 manipulations and using the PolynomialRing object.  Below I have some
 of my code so that you can see the types of manipulations I hope to
 speed up:

I would not think about using Cython until you know what is taking all
of the time in your program.  What would really be useful is some
sample input of the computations that you want to run (along with the
code that makes them work) so some actual profiling can be done.

Just looking at your code, it seems like.most of the slowdown could
come from doing arithmetic with symbolic expressions which currently
talk to Maxima and have quite a bit of overhead.  This will change in
Sage 4.0 which will be out next month.

--Mike

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



[sage-support] Re: Cython help

2009-04-24 Thread drupel

Thanks Mike,
Is it possible to do the symbolic computations with Cython?
If not, I will wait until Sage 4.0 comes out and see what happens.

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



[sage-support] Re: Cython help

2009-04-24 Thread Mike Hansen

On Fri, Apr 24, 2009 at 1:40 PM, drupel dylanru...@gmail.com wrote:
 Thanks Mike,
 Is it possible to do the symbolic computations with Cython?

Yes, you can do them from within Cython, but it's not going to give
you the speed up that you might think / want.  Making code faster is
almost entirely finding out exactly where all of the time is being
spent.

 If not, I will wait until Sage 4.0 comes out and see what happens.

If you send me your code (along with sample runs), I'll go through and
speed things up for you.  That are optimizations that you can do by
just being conscious of data types and things like that.

--Mike

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



[sage-support] Re: Cython help

2009-04-24 Thread drupel

I sent a copy of my code and a few samples of what I would like to do
with it to your gmail.

Thanks for your help,
Dylan

On Apr 24, 1:48 pm, Mike Hansen mhan...@gmail.com wrote:
 On Fri, Apr 24, 2009 at 1:40 PM, drupel dylanru...@gmail.com wrote:
  Thanks Mike,
  Is it possible to do the symbolic computations with Cython?

 Yes, you can do them from within Cython, but it's not going to give
 you the speed up that you might think / want.  Making code faster is
 almost entirely finding out exactly where all of the time is being
 spent.

  If not, I will wait until Sage 4.0 comes out and see what happens.

 If you send me your code (along with sample runs), I'll go through and
 speed things up for you.  That are optimizations that you can do by
 just being conscious of data types and things like that.

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