Mailing List archive

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

[linux-dvb] Re: Newstruct and DVB-C with QAM_256



Holger Waechtler <holger@convergence.de> writes:

>  > so scaling by 257 is the same as duplicating the 8 bit values...
> but computationally a little more expensive -- a multiplication costs
> more than the shift-or combination

Such kinds of optimizations should be left to the compiler.

Compiling the following with gcc (optimizations turned on)

int foo(int bar) {
  return bar * 257;
}

produces

foo:
        pushl %ebp
        movl %esp,%ebp
        movl 8(%ebp),%eax
        sall $8,%eax
        addl 8(%ebp),%eax
        leave
        ret

Andreas

-- 
"In my eyes it is never a crime to steal knowledge. It is a good
theft. The pirate of knowledge is a good pirate."
                                                       (Michel Serres)


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index