AI Applications in C++: How costly are virtual functions? What are the possible optimizations?

前端 未结 15 1320
慢半拍i
慢半拍i 2020-12-23 12:43

In an AI application I am writing in C++,

  1. there is not much numerical computation
  2. there are lot of structures for which run-time polymorphism is ne
15条回答
  •  情深已故
    2020-12-23 13:26

    With modern, ahead-looking, multiple-dispatching CPUs the overhead for a virtual function might well be zero. Nada. Zip.

提交回复
热议问题