avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] Speed up strtoul(), similar to strtol()


From: Dmitry K.
Subject: [avr-libc-dev] Speed up strtoul(), similar to strtol()
Date: Mon, 17 Jan 2005 09:10:26 +1000
User-agent: KMail/1.5

Hi.

I have attempt to submit next patch to savannah, but in result:

   Duplicate post: this form was already submitted; Exiting;

I have attempt to change phrases a little -- no results.

By this reason I submit patch through E-mail:

Summary:
~~~~~~~
Speed up strtoul(), similar to strtol()

Original submission:
~~~~~~~~~~~~~~~~~~~
It is possible to speed up strtoul() by excluding division operation for most 
common bases (10,16 and 8). I have attempt do it.
And another small optimizations.

In result the quantity of clocks for `strtoul("12345",0,0)' has decreased with 
2190 up to 660. Usage of a stack has decreased on 13 bytes.
The size of a code has changed small: 260 -> 265 words.
(avr-gcc 3.3.4, atmega8, -Os -frename-registers).

Tests are present.

Attach file:
~~~~~~~~~~~
Tarball with patched source and test suite.

Attachment: strtoul-20050116.tar.gz
Description: Text document


reply via email to

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