timeit.timeit('float("-1.1")')
timeit.timeit("pat.match('-1.1')",
    "import re; pat=re.compile(r'^-?\\d*\\.?\\d+(?:[Ee]-?\\d+)?$');")
How to check whether string might be type-cast to float in Python?