[vlc-devel] [PATCH 05/25] cpu: force feature support runtime check
Victorien Le Couviour
victorien.lecouviour.tuffet at gmail.com
Tue Apr 14 17:29:38 CEST 2020
On Tue, Apr 14, 2020 at 5:15 PM Thomas Guillem <thomas at gllm.fr> wrote:
> On Tue, Apr 14, 2020, at 16:57, Alexandre Janniaux wrote:
> > Hi,
> > On Tue, Apr 14, 2020 at 05:45:18PM +0300, Rémi Denis-Courmont wrote:
> > > Le tiistaina 14. huhtikuuta 2020, 17.35.42 EEST Alexandre Janniaux a
> écrit :
> > > > Hi,
> > > >
> > > > Isn't vlc_CPU checked only in initialization steps to choose
> > > > the correct variant?
> > >
> > > No.
Yes, mostly, only a few things stilll check at each call. (3 files IIRC,
Otherwise it's only done in init.
(consider the other patches in the patchset which already change that for
packetizer_startcode and deinterlacing filters)
> > Can't we just remove the few case where it's not calling it
> > during initialization? At the same time, it would remove
> > uneeded atomic operation on hot paths.
> Indeed, we could fix the few case where vlc_CPU is checked often.
> In that case, I'm OK with this patch, that is simplifying it a lot.
Yeah so I started to do that on the parts I worked on (packetizer_startcode
and deinterlace), a few things remain, but not much.
> > It's mainly done your way in copy.c.
> > >
> > > > What is the performance hit?
Almost none anyway, it's just a test + conditional jmp / call, mostly, I
don't know what "crap" the compiler puts around that.
But that's definitely not something you would be able to notice, in any
It's more of a good engineering thingy, don't call things over and over
that will always return the same result, cache it.
> > >
> > > If you had read the patch, it would be obvious.
If you had read the patchset, it would be obvious.
> > I find this aggressive and irrelevant.
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel