Performance penalty for working with interfaces in C++?

前端 未结 16 1818
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 11:21

Is there a runtime performance penalty when using interfaces (abstract base classes) in C++?

16条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 11:56

    The only main difference I know of is that, since you're not using a concrete class, inlining is (much?) harder to do.

提交回复
热议问题