* a simple single threaded test with bc

it computes the first x digits of sin(x)
This commit is contained in:
Jeff Carr 2011-08-16 11:45:58 -04:00
parent fa41345a83
commit 9caf71b6d1
2 changed files with 10 additions and 0 deletions

5
cpu/Makefile Normal file
View File

@ -0,0 +1,5 @@
all:
time ./bc_sin.sh 500
time ./bc_sin.sh 1000
time ./bc_sin.sh 2000
time ./bc_sin.sh 3000

5
cpu/bc_sin.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# bc is not threaded. This only tests 1 cpu
echo "scale=$1; s(1)" | bc -l &>/dev/null