[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] '-morder' option with Avr-libc: comparison table
From: |
Dmitry K. |
Subject: |
[avr-gcc-list] '-morder' option with Avr-libc: comparison table |
Date: |
Mon, 14 Jan 2008 08:33:39 +1000 |
User-agent: |
KMail/1.5 |
Hi.
Summary results for Avr-libc CVS HEAD 2008-01-13, only C-functions.
Values (base variant) are slightly different from ones of 10 Jan,
due to bug #21995 is fixed. GCC 4.3.X is 4.3-20080104 snapshot.
AVR: at90s8515__________________________ atmega8____________________________
GCC: 3.3.6 3.4.6 4.0.4 4.1.2 4.2.2 4.3.X 3.3.6 3.4.6 4.0.4 4.1.2 4.2.2 4.3.X
===============================================================================
*** Base: default options (-Os, -mcall-prologues), pure compilers:
Flash: 24016 23910 24322 24000 24332 25226 21750 21650 21930 21746 21990 22570
Stack: 597 604 623 628 676 654 597 604 624 628 664 643
-------------------------------------------------------------------------------
*** Option '-morder1' is added:
Flash: 23866 23644 24014 23746 24078 24834 21672 21536 21866 21646 21822 22518
Stack: 587 594 615 620 673 644 587 602 625 630 669 644
-------------------------------------------------------------------------------
*** Option '-morder2' is added:
Flash: 24058 23952 24352 24034 24354 25248 21786 21684 21982 21796 22020 22646
Stack: 605 612 623 630 678 654 605 612 628 634 670 643
-------------------------------------------------------------------------------
*** Experimental order of Andrew Hutchinson:
Flash: 23934 23690 24148 23866 24102 24888 21694 21546 21950 21720 21832 22552
Stack: 593 592 624 622 673 654 593 600 634 632 669 654
-------------------------------------------------------------------------------
*** Option '-frename-registers' is added:
Flash: 23970 23908 24298 23990 24318 25236 21716 21652 21914 21740 21976 22574
Stack: 597 604 623 628 676 654 597 604 624 628 664 643
-------------------------------------------------------------------------------
*** Options '-morder1' and '-frename-registers' are added:
Flash: 23796 23630 23990 23728 24060 24840 21618 21522 21842 21628 21804 22524
Stack: 587 594 615 620 673 644 587 602 625 630 669 644
-------------------------------------------------------------------------------
For reference the full table of the base (default options):
AVR: at90s8515__________________________ atmega8____________________________
GCC: 3.3.6 3.4.6 4.0.4 4.1.2 4.2.2 4.3.X 3.3.6 3.4.6 4.0.4 4.1.2 4.2.2 4.3.X
-------------------------------------------------------------------------------
bsearch("z",s,sizeof(s),1,cmp)
Flash: 272 270 266 266 266 268 214 212 208 208 208 204
Stack: 16 16 16 16 16 16 16 16 16 16 16 16
Time: 526 533 530 530 530 530 327 334 331 331 331 327
-------------------------------------------------------------------------------
dtostre(1.2345,s,6,0)
Flash: 1000 998 1104 1194 1184 1174 932 930 1020 1094 1088 1086
Stack: 15 15 15 17 17 17 15 15 15 17 17 17
Time: 1197 1197 1285 1313 1313 1290 1058 1058 1119 1152 1152 1143
-------------------------------------------------------------------------------
dtostrf(1.2345,15,6,s)
Flash: 1666 1688 1696 1668 1676 1690 1512 1528 1568 1544 1548 1566
Stack: 35 38 38 38 36 39 35 38 38 38 36 39
Time: 1670 1621 1667 1607 1608 1618 1480 1437 1493 1444 1443 1456
-------------------------------------------------------------------------------
free(p)
Flash: 540 548 544 544 556 568 486 494 500 500 508 512
Stack: 4 4 4 4 4 4 4 4 4 4 4 4
Time: 222 229 229 229 231 229 201 208 211 211 212 210
-------------------------------------------------------------------------------
malloc(1)
Flash: 540 548 544 544 556 568 486 494 500 500 508 512
Stack: 2 4 4 4 4 4 2 4 4 4 4 4
Time: 186 193 195 195 197 195 167 174 178 178 179 177
-------------------------------------------------------------------------------
qsort(s,sizeof(s),1,cmp)
Flash: 1314 1302 1220 1222 1242 1496 1086 1078 994 996 1008 1268
Stack: 36 36 36 36 38 40 36 36 36 36 38 40
Time: 21915 21896 20182 20474 20914 21091 16976 16964 16002 16294 16678 16926
-------------------------------------------------------------------------------
rand()
Flash: 548 548 498 492 508 498 508 508 478 480 484 456
Stack: 18 18 18 18 18 18 18 18 18 18 18 18
Time: 1505 1505 1484 1484 1488 1484 1497 1497 1482 1482 1484 1475
-------------------------------------------------------------------------------
realloc((void*)0,1)
Flash: 1162 1170 1156 1130 1156 1166 1036 1046 1044 1032 1046 1046
Stack: 18 20 20 18 20 22 18 20 20 18 20 22
Time: 293 300 302 294 304 311 269 276 280 272 281 288
-------------------------------------------------------------------------------
sprintf_min(s,"%d",12345)
Flash: 1306 1272 1292 1210 1216 1274 1158 1138 1160 1082 1086 1142
Stack: 55 55 54 53 59 54 55 55 54 53 59 54
Time: 1847 1841 1805 1811 1846 1801 1706 1703 1673 1678 1711 1666
-------------------------------------------------------------------------------
sprintf(s,"%d",12345)
Flash: 1720 1696 1704 1642 1674 1608 1534 1514 1524 1462 1498 1422
Stack: 54 54 57 57 58 57 54 54 57 57 58 57
Time: 1633 1627 1639 1618 1610 1623 1545 1543 1555 1536 1528 1537
-------------------------------------------------------------------------------
sprintf_flt(s,"%e",1.2345)
Flash: 3422 3372 3300 3262 3334 3320 3124 3086 3004 2966 3040 2966
Stack: 61 61 63 64 66 66 61 61 63 64 66 67
Time: 2503 2496 2500 2482 2513 2492 2280 2277 2282 2263 2297 2302
-------------------------------------------------------------------------------
sscanf_min("12345","%d",&i)
Flash: 1468 1466 1486 1484 1498 1504 1332 1332 1348 1350 1360 1364
Stack: 49 49 53 53 59 55 49 49 53 53 59 55
Time: 1681 1672 1640 1638 1643 1685 1371 1367 1359 1357 1356 1392
-------------------------------------------------------------------------------
sscanf("12345","%d",&i)
Flash: 1792 1784 1908 1874 1848 1876 1622 1614 1698 1672 1662 1668
Stack: 50 50 54 54 61 56 50 50 54 54 61 56
Time: 1715 1736 1714 1694 1749 1751 1413 1434 1432 1417 1461 1463
-------------------------------------------------------------------------------
sscanf_flt("1.2345","%e",&x)
Flash: 4134 4094 4190 4114 4220 4472 3786 3746 3792 3756 3856 4086
Stack: 124 124 126 128 140 132 124 124 126 128 140 132
Time: 3026 3025 3023 3043 3104 3165 2651 2651 2652 2673 2729 2778
-------------------------------------------------------------------------------
strtod("1.2345",&p)
Flash: 1546 1532 1664 1624 1624 1902 1440 1428 1524 1500 1500 1760
Stack: 20 20 20 22 22 20 20 20 20 22 22 20
Time: 1244 1242 1266 1268 1266 1294 980 979 1003 1007 1005 1032
-------------------------------------------------------------------------------
strtol("12345",&p,0)
Flash: 810 844 882 892 942 972 764 774 744 806 808 752
Stack: 20 20 20 21 29 27 20 20 21 21 21 21
Time: 979 1003 956 981 1074 1035 716 714 671 711 722 681
-------------------------------------------------------------------------------
strtoul("12345",&p,0)
Flash: 776 778 868 838 832 870 730 728 824 798 782 760
Stack: 20 20 25 25 29 27 20 20 25 25 25 21
Time: 967 967 1015 999 1023 1019 704 695 762 748 748 701
===============================================================================
Summary
Flash: 24016 23910 24322 24000 24332 25226 21750 21650 21930 21746 21990 22570
Stack: 597 604 623 628 676 654 597 604 624 628 664 643
Time: 43109 43083 41432 41660 42413 42613 35341 35311 34485 34754 35317 35554
End of list
- [avr-gcc-list] '-morder' option with Avr-libc: comparison table,
Dmitry K. <=