Last active
December 28, 2022 22:24
-
-
Save davnicwil/2428141a4c2d7b1ae8a0199ee4a4a605 to your computer and use it in GitHub Desktop.
Rough CPU benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start=`date +%s`;num=0;for ((n=0;n<100000000;n++));do num=$(($num+(1 + $RANDOM % 10)));done; end=`date +%s`;runtime=$(($end-$start));echo "result is $num, took $runtime seconds"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment