|
From: | Georg-Johann Lay |
Subject: | Re: [avr-gcc-list] Speeding [u]ltoa by 35% |
Date: | Tue, 19 Jun 2012 10:34:44 +0200 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
Georg-Johann Lay schrieb:
Reviewing the ltoa sources [0] shows that the implementation's speed is not award winning: it uses 32-bit div+mod. There was propose [1] to speed ltoa by means of LUT but that approach tries to use lookup tables for special radices. The new proposal inlines __divmodsi4 leading to an ~35% tick gain without increasing code size: [...]
With 5 more instructions an even more impressive speed gain of 40%..50% or even more can be worked out: http://sourceforge.net/apps/mediawiki/mobilechessboar/nfs/project/m/mo/mobilechessboar/a/aa/Ltoa2.png Plot is for the same 364 sample values as
[2] Plot:http://sourceforge.net/apps/mediawiki/mobilechessboar/nfs/project/m/mo/mobilechessboar/4/48/Ltoa.png[3] Plot Descriptionhttp://sourceforge.net/apps/mediawiki/mobilechessboar/index.php?title=File:Ltoa.png#Description
[Prev in Thread] | Current Thread | [Next in Thread] |