[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] Initilizing complex const arrays : syntax ? |
Date: |
Mon, 19 Sep 2005 06:11:05 +0200 |
On Sun, 2005-09-18 at 21:24 -0500, David Kelly wrote:
> On Sep 18, 2005, at 7:58 PM, Vincent Trouilliez wrote:
> >
> > ...compiles and runs fine, but my scope timed it at no less than
> > 13ms !!!! I am running on the on-chip 1MHz RC oscillator, so that's
> > about 13,000 machine cycles then, ouch !
>
> Shame on you for actually *measuring* something! You could have been
> dumb and happy had you not measured!
>
> Possibly you now understand why I said earlier that I don't use printf
> ()? I didn't measure execution time, years ago I waded thru the
> source code of other embedded printf()'s. Too much stuff for my
> embedded tastes.
Okay, I got your dot_two() working (the another_dot_two() has one last
fatal error that I can't figure out yet).
I tested it in all fairness. That is, I modified the printf hack from
printf ("%d.%03d", x / 1000, x % 1000), to
printf ("%d.%02d", x / 100, x % 100)
So that the functionality is the same as dot_two().
Doing this, printf doesn't take 13ms anymore, but 10ms.
And your dot_two() takes... 6ms ! That's a whole 40% faster, not bad
indeed !!! :o)
--
Vince
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, (continued)
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Jesper Hansen, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Anton Erasmus, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Jesper Hansen, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Richard Urwin, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?,
Vincent Trouilliez <=
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Dave Hansen, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Brown, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Richard Urwin, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Brown, 2005/09/20
- [avr-gcc-list] OT Generic C question, Trampas, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Bernard Fouché, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Colin Paul Gloster, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, David Brown, 2005/09/20
- RE: [avr-gcc-list] OT Generic C question, Trampas, 2005/09/20