This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients BreamoreBoy, brian.curtin, ezio.melotti, jcea, mandel, serhiy.storchaka, terry.reedy
Date 2014-07-22.10:09:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406023760.18.0.260279544533.issue15275@psf.upfronthosting.co.za>
In-reply-to
Content
Here is alternative patch. I believe it makes a code simpler.

Microbenchmarks:

$ ./python -m timeit -n 100000 -s "from ntpath import splitdrive"  "splitdrive('c:foo')"

Before: 100000 loops, best of 3: 20 usec per loop
After: 100000 loops, best of 3: 11.5 usec per loop

$ ./python -m timeit -n 100000 -s "from ntpath import splitext"  "splitext('python.exe')"

Before: 100000 loops, best of 3: 23.6 usec per loop
After: 100000 loops, best of 3: 18 usec per loop

$ ./python -m timeit -s "from ntpath import join"  "join('foo', 'bar')"

Before: 10000 loops, best of 3: 50.9 usec per loop
After: 10000 loops, best of 3: 32.3 usec per loop

$ ./python -m timeit -s "from ntpath import normpath"  "normpath('/foo/bar/baz')"

Before: 10000 loops, best of 3: 67.5 usec per loop
After: 10000 loops, best of 3: 40.3 usec per loop

$ ./python -m timeit -s "from ntpath import relpath"  "relpath('foo', 'bar')"

Before: 1000 loops, best of 3: 695 usec per loop
After: 1000 loops, best of 3: 456 usec per loop
History
Date User Action Args
2014-07-22 10:09:20serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, jcea, ezio.melotti, brian.curtin, BreamoreBoy, mandel
2014-07-22 10:09:20serhiy.storchakasetmessageid: <1406023760.18.0.260279544533.issue15275@psf.upfronthosting.co.za>
2014-07-22 10:09:20serhiy.storchakalinkissue15275 messages
2014-07-22 10:09:20serhiy.storchakacreate