Closed felixrindt closed 5 years ago
Printing is a costly operation. This introduces a mechanism so that we don't output as often. This leads to some performance improvement.
$ time python factorize.py 2595925957847039 2595925957847039 = 38047 * 140281 * 486377 python factorize.py 2595925957847039 5.73s user 0.01s system 99% cpu 5.742 total $ git checkout master Switched to branch 'master' $ time python factorize.py 2595925957847039 2595925957847039 = 38047 * 140281 * 486377 python factorize.py 2595925957847039 6.19s user 0.04s system 99% cpu 6.257 total```
Printing is a costly operation. This introduces a mechanism so that we don't output as often. This leads to some performance improvement.