Re:Qt signal is ten times slower than a virtual function
by int_19h on Thursday August 11, 2022 @08:04PM
(#32433339)
Semantically, a signal is basically just a collection of method pointers + receivers for the same, so one could reasonably expect the same performance as iterating over a bunch of function pointers and calling them in turn. Which shouldn't be 10x slower than calling a single pointer.
(I believe the reason why it doesn't quite work that way in practice is because slot dispatch is ID-based, not pointer-based.)
(I believe the reason why it doesn't quite work that way in practice is because slot dispatch is ID-based, not pointer-based.)