def __cmp__(self, other):
result = cmp(self._className, other._className)
if result is 0:
result = cmp(self._serialNum, other._serialNum)
return resultReversing the cmp() order would likely be faster for two reasons:
- integer comparison faster than string comparison
- it is more likely that two serial numbers will differ than it is for two class names to differ
A completely untested optimize-first observation while reviewing the code....
b.bum
------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel
