OK, i added this in 2298. I dont notice any speed enhancement in
overall performance of the unit tests even though it builds on set
and not sets.Set...this is probably because we dont use OrderedSet
too much. Also i had to make some changes so its compatible with 2.3
(no generator expressions,
On Jan 31, 1:28 pm, svilen [EMAIL PROTECTED] wrote:
another things i noted:
- using value.lower() == value instead of value.islower()
ha
x = 27
x.islower()
False
x.lower() == x
True
breaks a lot of tests too
--~--~-~--~~~---~--~~
You received this
- using value.lower() == value instead of value.islower()
ha
x = 27
x.islower()
False
x.lower() == x
True
breaks a lot of tests too
okay, forget that. Here an example OrderedSet over set; that seems to
give a bigger speedup than anything else, and without touching
anything.
another things i noted:
- using value.lower() == value instead of value.islower()
- ansisql.py:
in _requires_quotes():
this
bool(len([x for x in str(value)
if x not in self._legal_characters()]))
should be same as
bool( s.translate( 256*' ', self._legal_characters() ) )
On Jan 31, 1:28 pm, svilen [EMAIL PROTECTED] wrote:
another things i noted:
- using value.lower() == value instead of value.islower()
- ansisql.py:
in _requires_quotes():
this
bool(len([x for x in str(value)
if x not in self._legal_characters()]))
should be same as
another things i noted:
- using value.lower() == value instead of value.islower()
- ansisql.py:
in _requires_quotes():
this
bool(len([x for x in str(value)
if x not in self._legal_characters()]))
should be same as
bool( s.translate( 256*' ',
Reasonable people can differ here, but I agree that if what you care
about is a side effect, rather than a resulting list, using a for loop
is more clear than a list comprehension. (I suspect it is also more
performant since you are not allocating and populating a list object
for no reason.)
just habit ...i dont like one liners with :, also makes it easy to
tack on conditionals...feel free to submit a patch for all those if
theyre really bothering you (i guarantee program speed /mem usage will
not budge in any measurable way).
On Jan 25, 4:30 pm, [EMAIL PROTECTED] wrote:
there are