iteration without storing a variable

2009-03-25 Thread Josh Dukes
So The metasploit framework was suffering from some performance issues which they fixed. http://www.metasploit.com/blog/ I was interested in comparing this to python. Language comparisons are not generally very useful for a number of reasons, but some might find this interesting. Clearly the

Re: iteration without storing a variable

2009-03-25 Thread Stefan Behnel
Josh Dukes wrote: $ time python -c 'a = A; for r in xrange(10): a += A ' real 0m0.109s user 0m0.100s sys 0m0.010s Anyone get different results? Sure: $ time python -c 'a = A; for r in xrange(10): a += A ' real0m0.140s user0m0.132s sys 0m0.008s Stefan (BTW,

Re: iteration without storing a variable

2009-03-25 Thread Josh Dukes
well if we're interested in that... $ uname -a Linux IT2-JD 2.6.27-gentoo-r8 #1 SMP Tue Mar 17 14:28:19 PDT 2009 x86_64 Intel(R) Pentium(R) D CPU 2.80GHz GenuineIntel GNU/Linux $ python --version Python 2.5.2 $ ruby --version ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] but I was

Re: iteration without storing a variable

2009-03-25 Thread Stefan Behnel
Josh Dukes wrote: $ python --version Python 2.5.2 $ ruby --version ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] but I was more talking about the speed differences between ruby and python. I heard that Ruby 1.9 is supposed to be a lot faster than 1.8 in many aspects (as is Py2.6