[Sequential] Add type hints to improve the performance

The lack of type hints was killing the overall performance. Adding it
avoid the use of reflection by the runtime.