performance: initializing dictionary elements

George Thomas george at cc.gatech.edu
Tue May 21 10:39:46 EDT 2002


Hi everyone,
As part of a project I had to initialize elements in a large dictionary. I 
found Skip Montanaro's page of performance tips and the subsection 
"Initializing Dictionary Elements" presented an optimization using 
exceptions instead of conditional looping. I tried this out for my 
operation (which was the same one incidentally, a full-text index) but 
found that performance actually suffered. I'm using Python 2.1.1. Does 
anyone have any idea why this would happen?
rgds
-- 
-------------------------------------------------------------------------
who     : george thomas
what    : MSCS student
where   : college of computing/georgia institute of technology
business: Database Lab (CCB 104a)
email   : george at cc.gatech.edu
phone   : (404) 894-7008
that is all
-------------------------------------------------------------------------




More information about the Python-list mailing list