I run across a snippet in SCons.Util (don't worry, I've double-checked
To: field) that claims it is faster than os.path.splitext() while
basically doing the same thing.

def splitext(path):
    "Same as os.path.splitext() but faster."
    sep = rightmost_separator(path, os.sep)
    dot = path.rfind('.')
    # An ext is only real if it has at least one non-digit char
    if dot > sep and not containsOnly(path[dot:], "0123456789."):
        return path[:dot],path[dot:]
    else:
        return path,""

I wonder if upcoming speed.python.org has any means to validate these
claims for different Python releases?
Is there any place where I can upload my two to compare performance?
Are there any instructions how to create such snippets and add/enhance
dataset for them?
Any plans or opinions if that will be useful or not?
--
anatoly t.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to