top | item 34976396

(no title)

axilmar | 3 years ago

In C++, you can have clean code and performance, by utilizing templates.

In the example given, all polymorphism can be removed, and the shapes can be stored in std::tuple structure.

And then the operations would be faster than C, since no switch statement would be needed.

discuss

order

adamrezich|3 years ago

then your compile times balloon even larger than they already are in C++