It just looks like you're not thinking enough about your problem. Yes, loops in C++ or other compiled languages might faster than in Python, but they won't be faster than properly vectorized code. In fact, properly vectorized code in Python/PyTorch would probably be faster than a sloppy C++ implementation.
moodoki t1_j11vtce wrote
Reply to [D] Why are we stuck with Python for something that require so much speed and parallelism (neural networks)? by vprokopev
It just looks like you're not thinking enough about your problem. Yes, loops in C++ or other compiled languages might faster than in Python, but they won't be faster than properly vectorized code. In fact, properly vectorized code in Python/PyTorch would probably be faster than a sloppy C++ implementation.