Closed jiqicn closed 2 years ago
Compared np.random.choice() with np.random.shuffle() and built-in random.shuffle().
The result suggests that np.random.shuffle() performs much better than the other two.
By switching to np.random.shuffle(), it indeed gains a significant improvement on runtime (5 to 7 seconds).
Possible bottlenecks: