Re: OT: Remove X == TRUE tests for non-boolean values

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

 



...

over 10000 mostly empty surfaces. There will be one extra indirection when accessing the surface_client_lossy region, but x86_64 became pretty darn good at chasing pointers like that thanks to C++ vtables ;-)
Last sentence is a bit cryptic I think :-)

Sorry. Did not mean to be. What I meant is that chasing pointers like a->b->c is required to perform well for virtual function calls in C++ (this->foo() translates into this->vptr->vtbl[n]()). At some point, it was a huge performance hit for many workloads, because CPUs were not that good at prefetching this kind of double-dereferences. But C++ and other similar programming techniques with double indirection became so prevalent that CPUs are now quite good at it.
Was thinking at some more complicated like recent destructuring or something.
I think the most optimization came from h/w having more caches :-)
It's true that C++ can do more optimization that C as it has the full control of vtables (like merging
or putting in separate sections) but still you have the double dereference.
On the other way even Linux kernel uses a lot of xxxx_ops structures that are quite similar to
C++ vtables. I think you have two options basically... or you copy the function pointers for each
object (not really flexible, could be costly for small object or lot of pointers and hard to change
dynamically) or use the double dereference.

Frediano

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]