[Solved] Fast method of converting all strings in a list to integers


Multiprocessing is a way to get it done faster (in addition of using Numpy):

E.g:

In [11]: from multiprocessing import Pool

In [12]: pool = Pool(10)

In [13]: pool.map(int, [str(i) for i in range(500)])

Numpy will mostly provide a memory gain as you would be dealing with primitive types instead of python objects, but will also provide a non-negligible speed gain as well.
Optimizing time of an iteration like this is always done by using parallelization so I advise using both Numpy and a process pool.

2

solved Fast method of converting all strings in a list to integers