3 ms·
time python3 solver.py fred.cnf Took 9min and 10seconds on RPi 3 running Ubuntu 20.04. Consuming 100% CPU and 1% RAM (1024MB).
by punnerud 6y ago
time python3 solver.py fred.cnf
Took 9min and 10seconds on RPi 3 running Ubuntu 20.04. Consuming 100% CPU and 1% RAM (1024MB).
- nurettin 6y agoThis is actually amazing. My python programs rarely run at 100% cpu, whereas C++ binaries are usually up there. Always thought python's inefficiency causes the drop in cpu utilization.
- ygra 6y agoPython's regex implementation is probably not written in Python, so while it's trying to match, no Python code runs; it's all /C(++)?/.
- nromiun 6y agoI don't know about how efficient it is but I have always been able to peg all cores with the multiprocessing module. Even something useless like "x * x" is more then enough for 800%.