|
|
|
|
|
by Someone
1085 days ago
|
|
The title should be “optimization-demo” (original title) or “Replacing parts of Python programs by C++ can be easy and profitable”. They replace Python code that makes 5 calls into native code by code that makes 1 call that makes those 5 calls, and get a speed up from 869k calls per second to 3.15m calls per second, so a snarky title could even be “Python-to-native calls are slow”. They could even measure it by adding a C++ version of that def magic_accept(key: str) -> str:
return 's3pPLMBiTxaQ9kYGzzhZRbK+xOo='
code and benchmarking that. |
|