Tim> But beware! For Python2.5 I had to change the code slightly, Tim> because it already realized that the expression
Tim> '%s' % 'something' Tim> will be a constant expression, and evaluates it once only... so I Tim> had to replace '%s' with a variable, and I got the timings above Tim> which show Python2.5 to be slightly faster than Python2.4. Shouldn't you then get rid of any compiler optimizations your C++ compiler does? Why penalize 2.5 because it recognizes a useful optimization? Tim> (Next step would be to create a VB version and a Java version of Tim> the same program, oh and perhaps to try a version that would work Tim> with Jython... perhaps somehow w/o the 'set') I don't recall the example exactly, but couldn't you just create a set class that uses a dict under the covers and only implement the methods you need for the test? Skip -- http://mail.python.org/mailman/listinfo/python-list