On Apr 8, 2009, at 1:51 PM, Justin C. Walker wrote:

>> So this means duplicating the subdivisions part of the general matrix
>> str function for the mod 2 case?
>
> As a first cut, why not use the local str() method unless subdivisions
> are in place.  There may be a performance issue in determining the
> latter (ISTR that this requires using "try: except:", which is a bit
> painful if the 'except' branch is taken).

It's not to messy except when multiple subdivision occur in a row.

> I had spent some time a while back trying to clean up the subdivision
> code, but got waylaid and haven't found my way back to that particular
> clearing...
>
> But first things first.  We should fix the mod2 case, then worry about
> the rest.

I posted a different patch.

> I would hazard the guess that non-mod2 'str' processing will suffer
> the same performance issue, so maybe fix all at the same time?  I.e.,
> support subdivisions for mod2 strings and improve performance for non-
> mod2 strings.

I think the issue is that the generic code extracts and calls str on  
each element, which isn't needed in the specialized mod2 case. (It  
also does work to make all entries aligned.)

- Robert



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to