The Cyber-Spy.Com Usenet Archive Feeds Directly From The Open And Publicly Available Newsgroup Sci.Electronics.Design
This Group And Thousands Of Others Are Available On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic, Opinions Or Content Posted To This Or Any Other Newsgroup. This Web Archive Of The Newsgroup And Posts Are For Informational Purposes Only.
From: "D Poinsett"
Newsgroups: sci.electronics.design
Subject: Re: To C or not to C
Date: Sun, 5 Jan 2003 14:38:07 -0500
Organization: Posted via Supernews, http://www.supernews.com
Message-ID:
References: <3e1853bb.20798186@news.planet.nl> <3e187255$0$57466$1b62eedf@news.euronet.nl> <3e1880cf$0$57462$1b62eedf@news.euronet.nl> <3e188467.33257802@news.planet.nl> <3e1888b5$0$57480$1b62eedf@news.euronet.nl> <4b2h1v4s5e6cv65h6b75e1fj1j4ug3llih@4ax.com>
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
Excellent point and great example showing why a good embedded designer will
know how to leverage inline assembler.
Dave Poinsett
"Spehro Pefhany" wrote in message
news:4b2h1v4s5e6cv65h6b75e1fj1j4ug3llih@4ax.com...
>
> snips...
>
> >> Only one way to find out; flip one bit this way and look what the
> >> compiler produces. Many compilers, for examples, replace a division or
> >> multiplycation by 2^n with a shift instruction.
> >
> >Yes, or even follow it with an add or sub, when multipying by 9 or 7 etc.
>
> Are any compilers for micros that smart? This is another case where a
> bit of inline assembly can make things fly- hard wiring multiplication
> by constants. Compared to naive division by a constant, it might be
> 100* faster.
>
> Best regards,
> Spehro Pefhany
> --
> "it's the network..." "The Journey is the reward"
> speff@interlog.com Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog Info for designers:
http://www.speff.com
Go Back To The Cyber-Spy.Com Usenet Web Archive Index Of The sci.electronics.design Newsgroup
|