|
22 | 22 | Benchmark math performance using CP/M target and z88dk-ticks
|
23 | 23 |
|
24 | 24 | SCCZ80
|
25 |
| - genmath -> 400944733 cycles (7 digits accuracy) % zcc +cpm -lndos -lm -create-app savage.c -osavage // -DPRINT |
26 |
| - math48 -> 277174281 cycles (7 digits accuracy) % zcc +cpm -lndos -lmath48 -create-app savage.c -osavage // -DPRINT |
27 |
| - math32 -> 127461377 cycles (5 digits accuracy) % zcc +cpm -lndos --math32 -create-app savage.c -osavage // -DPRINT |
28 |
| - am9511 -> 33010850 cycles (5 digits accuracy) % zcc +cpm -lndos --am9511 -create-app savage.c -osavage // -DPRINT |
| 25 | + genmath -> 400944733 cycles (7 digits accuracy) % zcc +cpm -lndos -lm -create-app savage.c -osavage // -DNOPRINT |
| 26 | + math48 -> 277174281 cycles (7 digits accuracy) % zcc +cpm -lndos -lmath48 -create-app savage.c -osavage // -DNOPRINT |
| 27 | + math32 -> 127461377 cycles (5 digits accuracy) % zcc +cpm -lndos --math32 -create-app savage.c -osavage // -DNOPRINT |
| 28 | + am9511 -> 33010850 cycles (5 digits accuracy) % zcc +cpm -lndos --am9511 -create-app savage.c -osavage // -DNOPRINT |
29 | 29 |
|
30 | 30 | SDCC
|
31 |
| - math48 -> 278043533 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos -lmath48 -create-app savage.c -osavage // -DPRINT |
32 |
| - math32 -> 127380163 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --math32 -create-app savage.c -osavage // -DPRINT |
33 |
| - am9511 -> 32929636 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --am9511 -create-app savage.c -osavage // -DPRINT |
| 31 | + math48 -> 278043533 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos -lmath48 -create-app savage.c -osavage // -DNOPRINT |
| 32 | + math32 -> 127380163 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --math32 -create-app savage.c -osavage // -DNOPRINT |
| 33 | + am9511 -> 32929636 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --am9511 -create-app savage.c -osavage // -DNOPRINT |
34 | 34 |
|
35 | 35 | Note the loss of accuracy moving from the (genmath or math48) 40 bit mantissa to (math32 or am9511) IEEE 23 bit mantissa,
|
36 | 36 | when EITHER sdcc OR math32 is used.
|
@@ -67,7 +67,7 @@ int main(void)
|
67 | 67 | for(i = 0; i < ILOOP; ++i)
|
68 | 68 | {
|
69 | 69 | aprime = tan(atan(exp(log(sqrt(a * a)))));
|
70 |
| -#ifdef PRINT |
| 70 | +#ifndef NOPRINT |
71 | 71 | printf("A = %f -> %f\n", a, aprime);
|
72 | 72 | #endif
|
73 | 73 | a += 1.0;
|
|
0 commit comments