torch.jit is not exactly for accelreating speed, rather optimizing the script. It is a way to create serializable and optimizable models from PyTorch code. Any code written in it can be saved from your Python process and loaded in a process where there is no Python dependency.
It provide tools to incrementally transition a model from being a pure Python program to a TorchScript program that can be run independently from Python, for instance, in a standalone C++ program. This makes it possible to train models in PyTorch using familiar tools and then export the model to a production environment where it is not a good idea to run models as Python programs for performance and multi-threading reasons.