2016-09-15 21:33 GMT+02:00 Victor Stinner <victor.stinner at gmail.com>: > perf takes ~60 seconds by default. If you don't care of the accuracy, > use --fast and it now only takes 20 seconds ;-) Oops, I'm wrong. By default, a "single dot" (one worker process) takes less 1 second, so 20 dots (default) takes less than 20 seconds. On the following example, the setup statement is quite expensive: $ python3 -m timeit -s "d=dict.fromkeys(map(str,range(10**6)))" "list(d)" The statement "list(d)" takes around 47 ms, but the setup statement takes 377 ms. It seems like timeit executes the setup statement. Perf is based on timeit, and so each process runs the setup statement at least 4 times (1 warmup + 3 samples): 4*377 ms ~= 1.5 sec per process. Replace range(10**6) with range(10**5) and the benchmark itself becomes much faster: 57 seconds => 15 seconds. Victor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4