2 ms·
You use black-box unit tests developed against the Python code. You then write identical code in C++ that produces the same output (i.e. passes the unit tests).
by aabajian 9y ago
You use black-box unit tests developed against the Python code. You then write identical code in C++ that produces the same output (i.e. passes the unit tests). Then you apply optimizations/refactoring specific to C++. It is the latter - premature optimization - that is a pain in lower-level languages like C++, and which stops you from getting the correct result.
- mlevental 9y ago>You use black-box unit tests developed against the Python code. man that makes even less sense to me. do you have an example of code produced this way?