tweeks to the c tests
also figured out hello was caching stopped that to make results comparable even wrote a hello assembler version which is just 10% faster than soml :-)
This commit is contained in:
@ -17,7 +17,7 @@ int fibo(int n){
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter = 98304 + 1696;
|
||||
int counter = 100352 - 352;
|
||||
int counter2 = counter;
|
||||
int level = 40;
|
||||
int fib ;
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter = 98304 + 1696;
|
||||
setbuf(stdout, NULL); /* to make it equivalent to the soml, otherwise it caches */
|
||||
int counter = 100352 - 352;
|
||||
while(counter--) {
|
||||
printf("Hello there\n");
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ int main(void)
|
||||
{
|
||||
char stringa[20] ;
|
||||
|
||||
int counter = 98304 + 1696;
|
||||
int counter = 100352 - 352;
|
||||
while(counter--) {
|
||||
sprintf(stringa, "%i\n" , counter);
|
||||
}
|
||||
|
9
test/bench/c/loop.c
Normal file
9
test/bench/c/loop.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include<stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter = 100352 - 352;
|
||||
while(counter) {
|
||||
counter = counter - 1;
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
#include<stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter = 98304 + 1696;
|
||||
while(counter--) {
|
||||
counter = counter;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user