Re: Interesting timing issue I noticed

2008-04-16 Thread Gabriel Genellina
En Tue, 15 Apr 2008 23:24:01 -0300, Jonathan Shao [EMAIL PROTECTED] escribió: I've written up a stripped down version of the code. I apologize for the bad coding; I am in a bit of a hurry. First things first: I think you will gain inmensely using NumPy: http://numpy.scipy.org/ My

Interesting timing issue I noticed

2008-04-16 Thread Jonathan Shao
*Gabriel Genellina* gagsl-py2 at yahoo.com.ar python-list%40python.org?Subject=Interesting%20timing%20issue%20I%20noticedIn-Reply-To= *Wed Apr 16 08:44:10 CEST 2008* Another thing would be to rearrange the loops so the outer one executes less times; if you know that borderXsizeX and borderYsizeY

Re: Interesting timing issue I noticed

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 10:36:14 -0300, Jonathan Shao [EMAIL PROTECTED] escribió: *Gabriel Genellina* gagsl-py2 at yahoo.com.ar python-list%40python.org?Subject=Interesting%20timing%20issue%20I%20noticedIn-Reply-To= *Wed Apr 16 08:44:10 CEST 2008* Another thing would be to rearrange the loops so

Re: Interesting timing issue I noticed

2008-04-16 Thread Dan Upton
On Wed, Apr 16, 2008 at 2:54 PM, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 16 Apr 2008 10:36:14 -0300, Jonathan Shao [EMAIL PROTECTED] escribió: *Gabriel Genellina* gagsl-py2 at yahoo.com.ar python-list%40python.org?Subject=Interesting%20timing%20issue%20I%20noticedIn-Reply-To=

Re: Interesting timing issue I noticed

2008-04-15 Thread Jonathan Shao
I've written up a stripped down version of the code. I apologize for the bad coding; I am in a bit of a hurry. import random import sys import time sizeX = 320 sizeY = 240 borderX = 20 borderY = 20 # generates a zero matrix def generate_zero(): matrix = [[0 for y in range(sizeY)] for x in

Re: Interesting timing issue I noticed

2008-04-15 Thread Daniel Fetchinson
I've written up a stripped down version of the code. I apologize for the bad coding; I am in a bit of a hurry. import random import sys import time sizeX = 320 sizeY = 240 borderX = 20 borderY = 20 # generates a zero matrix def generate_zero(): matrix = [[0 for y in

Re: Interesting timing issue I noticed

2008-04-15 Thread Daniel Fetchinson
Can I then simply ignore the time data then? I do see better performance obviously the smaller the box is, but I guess my issues is how seriously to take all this data. Because I can't claim performance improvement if there isn't really much of an improvement. On Tue, Apr 15, 2008 at 11:04

Re: Interesting timing issue I noticed

2008-04-15 Thread Daniel Fetchinson
On 4/15/08, Daniel Fetchinson [EMAIL PROTECTED] wrote: Can I then simply ignore the time data then? I do see better performance obviously the smaller the box is, but I guess my issues is how seriously to take all this data. Because I can't claim performance improvement if there isn't

Interesting timing issue I noticed

2008-04-14 Thread Jonathan Shao
The project I'm working on is motion detection, involving a bit of image processing. No worries: no image processing background needed. Suffice to say that I initially wrote a script that goes through every pixel of a 320x240 picture (turned into an array using PIL) and performs some

Re: Interesting timing issue I noticed

2008-04-14 Thread Daniel Fetchinson
The project I'm working on is motion detection, involving a bit of image processing. No worries: no image processing background needed. Suffice to say that I initially wrote a script that goes through every pixel of a 320x240 picture (turned into an array using PIL) and performs some