[wingide-users] Performance running code in Wing

Krishna Sandeep Reddy dksreddy at gmail.com
Fri Jan 29 06:23:20 MST 2010


I actually see the opposite. (four runs, python2.5.1, 64bit linux)
On wing:
1.6880710125
1.66699099541
1.68564605713
1.65802907944

On Linux terminal:
1.74641609192
1.69046401978
1.70406508446
1.67473483086

Cheers,
Sandeep

On Thu, Jan 28, 2010 at 8:19 PM, Jan <jan.jansen at gmx.de> wrote:

> Hello,
>
> when I execute some code from Wing it's about 4 times slower than running
> from the command line. I wonder if this is normal or it there's something
> buggy going on?
>
> I'm on a i7-860 machine with windows 7-64 bit and python 2.6.4 (32 bit).
> I've seen this on Wing 3.2.3 and 3.2.4
>
> Kind regards,
>
> Jan
>
> Here's the code:
>
> from math import *
> import time
>
> radius = 6371
>
> def distance(latA, lngA, latB, lngB):
>    latAr = radians(latA)
>    lngAr = radians(lngA)
>    latBr = radians(latB)
>    lngBr = radians(lngB)
>
>    deltaLat = latBr - latAr
>    deltaLng = lngBr - lngAr
>
>    return radius * 2 * asin(sqrt(
>            sin(deltaLat/2)**2 + cos(latAr)
>            * cos(latBr) * (sin(deltaLng/2)**2)))
>
> def bench():
>    increment = 10
>
>    start = time.time()
>    latA = -90
>    while(latA <= 90):
>        lngA = -180
>        while(lngA <= 180):
>            latB = -90
>            while(latB <= 90):
>                lngB = -180
>                while(lngB <= 180):
>                    distance(latA, lngA, latB, lngB)
>                    lngB = lngB + increment
>                latB = latB + increment
>            lngA = lngA + increment
>        latA = latA + increment
>    end = time.time()
>    print end-start
>
> if __name__ == '__main__':
>    bench()
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100129/8b8ac4e6/attachment.html


More information about the wingide-users mailing list