lots of changes, created Disassembler class, removed a few globals etc.

This commit is contained in:
Artur K
2012-03-11 02:48:19 +01:00
parent 87e41f5a8a
commit bc395da6ab
60 changed files with 2058 additions and 151 deletions

View File

@@ -0,0 +1,23 @@
/* benchfn - benchmark for function calls
* Thomas Plum, Plum Hall Inc, 609-927-3770
* Let T be the execution time in milliseconds
* Then average time per operator = T/major usec
* (Because the inner loop has exactly 1000 operations)
*/
#include <stdio.h>
f3() { ;}
f2() { f3();f3();f3();f3();f3();f3();f3();f3();f3();f3();} /* 10 */
f1() { f2();f2();f2();f2();f2();f2();f2();f2();f2();f2();} /* 10 */
f0() { f1();f1();f1();f1();f1();f1();f1();f1();f1();} /* 9 */
main(int ac, char *av[])
{ long d, major;
printf ("enter number of iterations ");
scanf ("%ld", &major);
printf("executing %ld iterations\n", major);
for (d = 1; d <= major; ++d)
f0(); /* executes 1000 calls */
printf ("finished\n");
}