On 6/28/07, Justin C. Walker <[EMAIL PROTECTED]> wrote:
>      def is_symmetric(self):
> [...]
>          for i from 1 <= i < self._nrows:
>              for j from 0 <= j < self._ncols:
>                   [ DO SOMETHING ]

>      def is_sym3(self):
> [...]
>          for i in xrange(1,self._nrows):
>              for j in xrange(0,i):
>                   [ DO SOMETHING ]

Besides any difference in loop overhead, isn't is_symmetric() doing
almost twice as much work as is_sym3() ?

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to