python's performance

Fredrik Lundh fredrik at pythonware.com
Thu Sep 29 17:41:02 EDT 2005


> > Have u been used such camera with PIL before?
> >
> > im_1= Image.fromstring("I", datasize, buf, 'raw', 'I;16')

running on a 700 MHz box:

c:\> timeit -s "import Image" -s "data = 1344*1024*2*'x'"
    "im = Image.fromstring('I', (1344, 1024), data, 'raw', 'I;16')"
10 loops, best of 3: 102 msec per loop

running on a 3.0 GHz box:

c:\> timeit -s "import Image" -s "data = 1344*1024*2*'x'"
    "im = Image.fromstring('I', (1344, 1024), data, 'raw', 'I;16')"
10 loops, best of 3: 34.7 msec per loop

I somehow doubt that this takes 1 full second on a 2.0 GHz PC.

</F>






More information about the Python-list mailing list