Indeed, thanks Jason for showing how to improve the code in this way. I will 
definitely return to these tips for my next Sage project.

Thanks once more to Niles for making his original Hopf fibration code 
(http://www.nilesjohnson.net/hopf-production.html) public and for helping 
Ihechukwu and I with this project.

Bruce Bartlett

On Friday, September 14, 2012 1:12:06 AM UTC+2, jason wrote:
> On 9/13/12 5:06 PM, Jason Grout wrote:
> 
> 
> 
> > I think there is still a lot of room for speeding this up more, if
> 
> > someone wanted a fun project.
> 
> 
> 
> And I got another factor of 2 by making the inner function a Cython 
> 
> "class" [1]:
> 
> 
> 
> http://aleph.sagemath.org/?q=8b878cda-030d-4433-9d11-a10153d9d9a3
> 
> 
> 
> Okay, that's it for now.  But I still think there is room for 
> 
> improvement.  On my computer, the initial version took 20 seconds to do 
> 
> the above benchmark, and the Cython version takes .37s, so a speedup of 
> 
> about 50x or so.  I don't see that same speedup on aleph, and I'm not 
> 
> sure why.  Anyways, now it sort of works as an interact: 
> 
> http://aleph.sagemath.org/?q=3d4f343c-323e-43f6-a8a8-149cfd7217dc
> 
> 
> 
> Jason
> 
> 
> 
> [1] 
> 
> https://github.com/jasongrout/hopf_fibrations/commit/9c88cc0e3242ef3e50e311f65ba4300a5a4e5446

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to