avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Speeding [u]ltoa by 35%


From: Dmitry
Subject: Re: [avr-gcc-list] Speeding [u]ltoa by 35%
Date: Sun, 15 Jul 2012 20:53:40 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17pre) Gecko/20110415 Thunderbird/3.1.10pre

09.07.2012 08:56, Dmitry пишет:
Patch in progress.

I have continue the old #3729 patch.
Tarball is sended.

Changes are (in comparison to original):
1. ltoa() calls ultoa() (extra entry).
2. Small optimization: initialization of bits counter is
excluded (32*8=256).
3. This is debatable: run time radix check. The cost is
only 5 words, but there is no risk of overhead in case
variable radix. Thoughts?

02.07.2012 02:01, Georg-Johann Lay:
[...]
The time for ltoa is basically the same, but the time for
sprintf is off by about 200 ticks.


Hmm...
Results for sprintf(s,"%ld",123456789L) with a set
of avr-gcc versions:

  mcu:       at90s8515         atmega8
 base:     8   10   16     8   10   16
        --------------  --------------
3.3.6   1592 2601 1438  1507 2471 1363
3.4.6   1586 2595 1432  1505 2469 1361
4.0.4   1608 2617 1449  1526 2490 1377
4.1.2   1581 2590 1424  1501 2465 1354
4.2.4   1570 2581 1412  1490 2456 1342
4.3.6   1577 2590 1423  1494 2460 1350
4.4.6   1565 2575 1412  1483 2448 1340
4.5.4   1577 2587 1424  1494 2459 1351
4.6.3   1589 2604 1436  1518 2486 1375
4.7.1   1643 2653 1469  1527 2492 1371

Regards,
Dmitry.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]