def check_perf(setup):
    from timeit import timeit
    stmt = 'list(w for w in %s(%s))'
    print()
    print('Unicode template')
    print(timeit((stmt % ('unicode_ts', 'utext')), setup=setup, number=1000))
    print('Plain template')
    print(timeit((stmt % ('plain_ts', 'text')), setup=setup, number=1000))
    print('Unicode words')
    print(timeit((stmt % ('unicode_ws', 'utext')), setup=setup, number=1000))
    print('Plain words')
    print(timeit((stmt % ('plain_ws', 'text')), setup=setup, number=1000))
    print('Plain split')
    print(timeit('text.split()', setup=setup, number=1000))
    print('Unicode split')
    print(timeit('utext.split()', setup=setup, number=1000))
    print('Line split')
    print(timeit('text.splitlines(False)', setup=setup, number=1000))
    print('Line split with ends')
    print(timeit('text.splitlines(True)', setup=setup, number=1000))
def check_perf(setup):
    from timeit import timeit
    stmt = 'list(w for w in %s(%s))'
    print()
    print('Unicode template')
    print(timeit((stmt % ('unicode_ts', 'utext')), setup=setup, number=1000))
    print('Plain template')
    print(timeit((stmt % ('plain_ts', 'text')), setup=setup, number=1000))
    print('Unicode words')
    print(timeit((stmt % ('unicode_ws', 'utext')), setup=setup, number=1000))
    print('Plain words')
    print(timeit((stmt % ('plain_ws', 'text')), setup=setup, number=1000))
    print('Plain split')
    print(timeit('text.split()', setup=setup, number=1000))
    print('Unicode split')
    print(timeit('utext.split()', setup=setup, number=1000))
    print('Line split')
    print(timeit('text.splitlines(False)', setup=setup, number=1000))
    print('Line split with ends')
    print(timeit('text.splitlines(True)', setup=setup, number=1000))