Re: [Numpy-discussion] strange divergence in performance

2010-01-20 Thread Ernest Adrogué
20/01/10 @ 16:17 (-0600), thus spake Robert Kern: > 2010/1/20 Ernest Adrogué : > > Hi, > > > > I have a function where an array of integers (1-d) is compared > > element-wise to an integer using the greater-than operator. > > I noticed that when the integer is 0 it takes about 75% more time > > tha

Re: [Numpy-discussion] strange divergence in performance

2010-01-20 Thread Robert Kern
2010/1/20 Ernest Adrogué : > Hi, > > I have a function where an array of integers (1-d) is compared > element-wise to an integer using the greater-than operator. > I noticed that when the integer is 0 it takes about 75% more time > than when it's 1 or 2. Is there an explanation? > > Here is a strip

[Numpy-discussion] strange divergence in performance

2010-01-20 Thread Ernest Adrogué
Hi, I have a function where an array of integers (1-d) is compared element-wise to an integer using the greater-than operator. I noticed that when the integer is 0 it takes about 75% more time than when it's 1 or 2. Is there an explanation? Here is a stripped-down version which does (sort of)sho