Mailing List Archive


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

Re: [tlug] Alternatives to sed + awk



On Wed, 9 Mar 2011 13:09:07 +0100
Josh Glover <jmglov@example.com> wrote:

> On 9 March 2011 12:33, Lewske Wada <ryu@example.com> wrote:
> 
> > Because high-level languages do not necessarily generate the
> > optimized code as well as humans do.
> 
> I think this is a fallacy. I challenge you to profile your code and
> show that you can regularly beat gcc with the optimiser turned up.

Have you ever written code for a uC? if you go below 32bit, compilers
become increadibly stupid. They only work well when they have enough
registers and lots of memory.

Another thing is if you are doing high performance stuff where you
use each and every feature of your CPU. Have a look at libraries
like lavcodec which contain an increadible amount of hand written
assembler code.


> In my experience (which does not include any embedded development, so
> I may be completely wrong here--Jim P?), rolling your own ASM is only
> a good idea after you've written it in C, profiled it, found a chunk
> that needs to be more efficient, researched alternate algorithms for
> that place, and still need more efficiency.

That depends. People tend to shy away from assembler. And it's understandable.
It's hard to write, hard to debug and hard to read. If you can get around
it you will not touch it. But especially if you go to smaller machines, there
is no alternative to start directly in assembler. The mentioned PIC16F84
is one of those uCs i wouldnt bother using a compiler with.

 
			Attila Kinali

-- 
The trouble with you, Shev, is you don't say anything until you've saved
up a whole truckload of damned heavy brick arguments and then you dump
them all out and never look at the bleeding body mangled beneath the heap
		-- Tirin, The Dispossessed, U. Le Guin


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links