This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eolson
Recipients eolson, jafo, jcea, johansen, ysj.ray
Date 2014-04-15.16:33:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397579595.2.0.061253514336.issue2159@psf.upfronthosting.co.za>
In-reply-to
Content
The performance is still an issue in python 3.
Attaching a patch for python 3, performance numbers are below.

Measuring ndbm time for a falsey check on an open db with 100 entries.  gdbm performance is similar.
Before patch:
    db is not None: 6.9141387939453125e-06
    not db: 0.0006985664367675781
    Factor: 101X (slow)
  After patch:
    db is not None: 4.76837158203125e-06  
    not db: 4.0531158447265625e-06  
    Factor: 1X  (expected)

Also, added a couple tests to verify bool(db) returns the correct value.
History
Date User Action Args
2014-04-15 16:33:15eolsonsetrecipients: + eolson, jafo, jcea, johansen, ysj.ray
2014-04-15 16:33:15eolsonsetmessageid: <1397579595.2.0.061253514336.issue2159@psf.upfronthosting.co.za>
2014-04-15 16:33:15eolsonlinkissue2159 messages
2014-04-15 16:33:14eolsoncreate