虽然 benchmark 不一定能反映真实情况,但 C++ 虚函数调用的 penalty 还是挺高的。。。

Code 如下:
https://gist.github.com/Lancern/7f9852237e3ca0d8a7045c05b9e0e478
 
 
Back to Top