- C++ 58.4%
- C 41.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| bakabench.c | ||
| bakabench.cxx | ||
| CHANGELOG | ||
| COPYING | ||
| README.md | ||
BakaBench
What is this?
This program is a benchmark program that is the simplest, most straightforward, and “Baka” (the most foolish). This program measures performance by continuously adding 1 for a certain period of time (default is 10 seconds) and evaluating the resulting value.
What is “Baka”?
“Baka” (バカ) means “foolish” in Japanese and is commonly used with a connotation of insult or self‑deprecation. This benchmark program is very simple and does nothing complicated; it just continuously adds 1, which is why it is considered quite foolish. Therefore, this program is named “Baka.”
How to build
The recommended compiler is g++. It is likely that it can also be compiled with clang++, but g++ is preferred for the sake of uniformity in benchmark conditions. This program does not use any build systems like make. It can be easily built with the following command.
g++ -O0 bakabench.cxx -o bakabench
How to use
Usage example:
bakabench -d 10
Options:
-a Do not run the single‑core mode A benchmark.
-b Do not run the single‑core mode B benchmark.
-m Do not run the multicore benchmark.
-d <SECONDS> Specify benchmark duration in seconds. (default: 10)
-t <THREADS> Specify number of threads. (default: actual number of CPU threads.)
-s <MODE> Stress test mode. Specifying 0 for MODE runs in single‑core mode; 1 runs multicore mode.
-h, --help Print this help.
-v, --version Print version information
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
C version
I created a C language version of BakaBench in the process of making another benchmark program.
By rewrite in C language, readability and certainty were improved.
The score is should not compatible with the C++ version, so do not compare the scores of the C and C++ versions.
How to build
gcc -O0 bakabench.c -o bakabench
How to use
Usage:
./bakabench [-j <THREADS>] [-d <DURATION>]
Options:
-d : Specify the number of duration in seconds. (Default: 10)
-j : Specify the number of threads to run benchmark. (Default: 4)
-v --version : Print version information.
-h --help : Print this help.