regex1 [ python ] 정규표현식[5] Mastering Python Regular Expressions http://www.packtpub.com/ Authors : Félix López 제5장 Performance of Regular Expressions Benchmarking regular expressions with Python import re from time import time as now import cProfile # 함수 처리 과정 및 속도 측정 # 실행 속도 촉정 (ms) def test(f, *args, **kargs): start = now() f(*args, **kargs) print("The function %s lasted: %.12fms" % (f.__name__, (now() - start)*10**3)) .. 2022. 10. 31. 이전 1 다음