small c programs to bench against
This commit is contained in:
parent
22117035e0
commit
9bcead4c1a
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,3 +40,4 @@ pkg
|
|||||||
*.o
|
*.o
|
||||||
log
|
log
|
||||||
tmp
|
tmp
|
||||||
|
a.out
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
|
|
||||||
|
|
||||||
uint log2( uint n )
|
uint log2uni( uint n )
|
||||||
{
|
{
|
||||||
uint bit, pow, logn;
|
uint bit, pow, logn;
|
||||||
|
|
||||||
@ -92,8 +92,8 @@ void divideby2( uint type, uint n, uint lsb, uint msb )
|
|||||||
uint logmsb;
|
uint logmsb;
|
||||||
uint usinga4;
|
uint usinga4;
|
||||||
|
|
||||||
loglsb = log2( lsb );
|
loglsb = log2uni( lsb );
|
||||||
logmsb = log2( msb );
|
logmsb = log2uni( msb );
|
||||||
|
|
||||||
printf( "; %s [%s]\n\n", BANNER, DATE );
|
printf( "; %s [%s]\n\n", BANNER, DATE );
|
||||||
printf( "\tAREA |div%d$code|, CODE, READONLY\n\n", n );
|
printf( "\tAREA |div%d$code|, CODE, READONLY\n\n", n );
|
@ -19,7 +19,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
int counter = 1000000;
|
int counter = 1000000;
|
||||||
int counter2 = counter;
|
int counter2 = counter;
|
||||||
int level = 76;
|
int level = 40;
|
||||||
int fib ;
|
int fib ;
|
||||||
while(counter--) {
|
while(counter--) {
|
||||||
fib = fibo(level);
|
fib = fibo(level);
|
||||||
|
9
test/bench/hello.c
Normal file
9
test/bench/hello.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int counter = 1000000;
|
||||||
|
while(counter--) {
|
||||||
|
printf("Hello there\n");
|
||||||
|
}
|
||||||
|
}
|
9
test/bench/hello0.c
Normal file
9
test/bench/hello0.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int counter = 1000000;
|
||||||
|
while(counter--) {
|
||||||
|
printf("Hello there\n");
|
||||||
|
}
|
||||||
|
}
|
6
test/bench/null.c
Normal file
6
test/bench/null.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
9
test/bench/puti.c
Normal file
9
test/bench/puti.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int counter = 1000000;
|
||||||
|
while(counter--) {
|
||||||
|
printf("%i\n" , counter);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user