What is bench, and what do its results tell you?
bench is a UCI command in Pikafish. When you run bench, Pikafish searches 48 built-in positions on 1 core (to depth 13 by default). When it finishes, the engine prints the total time, the total number of nodes searched, and the number of nodes searched per second.
===========================
Total time (ms) : 1561
Nodes searched : 1879868
Nodes/second : 1204271For example, after running bench you get output like the above. "Total time (ms)" is the total time in milliseconds, "Nodes searched" is the total number of nodes searched, and "Nodes/second" (nps for short) is the number of nodes searched per second.
To benchmark with multiple threads, enter bench 128 <threads>.
For example, on a machine with 8 cores and 16 threads, enter bench 128 8 to test all physical cores, or bench 128 16 to test all hyper-threads.
Does a higher Nodes/second in bench mean a stronger engine?
Not necessarily. See the entry What is NPS (the "K value")? Does it represent playing strength? for details.
Extra: speedtest
Recent versions of Pikafish also include a speedtest command for benchmarking. It uses far more positions than bench, so it reflects computer performance more stably. By default it uses all threads and automatically sizes the hash according to the thread count.
