I am new to using Colab and trying to speed up my code by utilizing the GPU/TPU runtimes. I have a block of plain Python code without any data science libraries like TensorFlow or PyTorch. I was able to successfully change the runtime to TPU, which I confirmed using torch.cuda.is_available().
I am aware that the GPU and TPU runtimes provided by Colab are designed to accelerate machine learning workloads that leverage frameworks like TensorFlow and PyTorch. For general Python code without those libraries, you are unlikely to see significant performance improvements from using the faster hardware runtimes as a free Colab user. However, is there any way to speed up performance of general Python code, not just libraries like TensorFlow? Any guidance is greatly appreciated.