On Mon, Jan 18, 2016 at 12:37:58PM +0100, Mats Peterson wrote:
> On 01/18/2016 12:35 PM, Michael Niedermayer wrote:
> >>>
> >>Pure logic tells me it's faster to just increment than involve a
> >>series of multiplications.
> >
> >its not so simple
> >
> >theres a optimizing compiler between you and the CPU
> >the multiplication is a shift really, and the compiler may very well
> >change this to dst++, buf++ and buf < buf_end
> >or it might use something like p[8*i] and q[i]
> >i++ and a i<=0 check, the 8* can on some architectures be free as
> >part of addressing memory
> >
> >if you are interrested in optimizing code see
> >http://www.agner.org/optimize/
> >
> >and intels Intel 64 and IA-32 Architectures Software Developers Manual
> >is invaluable as a reference but not useable for other purposes than
> >as a reference (its too huge)
> >
> 
> I almost expected that answer, Michael. And I do know there's a lot
> going on behind the scenes. But how much is another question. And
> don't you think it's cleaner to just increment a variable here? Or
> should I revert to the old stuff?

the question is which way its faster, i dont know it. Only testing
can tell

also either way it should be in a seperate patch

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to