Author andrix
Recipients andrix, vstinner
Date 2009-01-14.16:54:48
SpamBayes Score 0.0193901
Marked as misclassified No
Message-id <1231952096.36.0.023788595647.issue4932@psf.upfronthosting.co.za>
In-reply-to
Content
Hi haypo,
 Ok I've been testing with python 2.6 and I put the results here:
 optimizedurlparse is the file with my patch

 First test optimizedurlparse, second urlparse:

#:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py 
timing optimizedurlparse.urlparse():
    [0.89634895324707031, 0.61937308311462402, 0.62004208564758301]
timing urlparse.urlparse():
    [0.64083003997802734, 0.6862800121307373, 0.67195010185241699]

#:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py 2000
timing optimizedurlparse.urlparse():
    [1.5077390670776367, 1.2391939163208008, 1.2390918731689453]
timing urlparse.urlparse():
    [1.2550511360168457, 1.2493829727172852, 1.2445049285888672]

Now I'll change the order of execution, first urlparse , second
optimizedurlparse:

#:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py 2000
timing urlparse.urlparse():
    [1.6836080551147461, 1.3892900943756104, 1.3195438385009766]
timing optimizedurlparse.urlparse():
    [1.4834678173065186, 1.4077410697937012, 1.3824198246002197]
[19647 refs]
#:/opt/python2.6/release26-maint$ ./python mio/profile_urlparse.py 2000
timing urlparse.urlparse():
    [1.4398901462554932, 1.3237769603729248, 1.3057329654693604]
timing optimizedurlparse.urlparse():
    [1.3134419918060303, 1.3127460479736328, 1.2928199768066406]
[19647 refs]

Python Version: 
2.6.1+ (release26-maint:68606, Jan 14 2009, 08:48:41)

The small changes optimize the urlparse.urlparse and urlsplit function a
bit :D.
History
Date User Action Args
2009-01-14 16:54:56andrixsetrecipients: + andrix, vstinner
2009-01-14 16:54:56andrixsetmessageid: <1231952096.36.0.023788595647.issue4932@psf.upfronthosting.co.za>
2009-01-14 16:54:55andrixlinkissue4932 messages
2009-01-14 16:54:55andrixcreate