mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
19 lines
694 B
Python
19 lines
694 B
Python
|
|
|
|
# 10000 iterations, just for relative comparison
|
|
# 2.7.5 3.3.2
|
|
# FilesCompleter 75.1109 69.2116
|
|
# FastFilesCompleter 0.7383 1.0760
|
|
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
import timeit
|
|
from argcomplete.completers import FilesCompleter
|
|
from _pytest._argcomplete import FastFilesCompleter
|
|
count = 1000 # only a few seconds
|
|
setup = 'from __main__ import FastFilesCompleter\nfc = FastFilesCompleter()'
|
|
run = 'fc("/d")'
|
|
sys.stdout.write('%s\n' % (timeit.timeit(run,
|
|
setup=setup.replace('Fast', ''), number=count)))
|
|
sys.stdout.write('%s\n' % (timeit.timeit(run, setup=setup, number=count)))
|