JS Code Runs Slow On Codepen, Though It Runs Good Locally
I have implemented minimax algorithm for an unbeatable tic toc toe game. The minimax algorithm is recursive, performing big iterations, which are not big for the computer, only big
Solution 1:
Use a profiler to pinpoint where the code is slow.
Here's the profiler result using Google Chrome.
The problem seems to start from the function minimaxMove
.
Post a Comment for "JS Code Runs Slow On Codepen, Though It Runs Good Locally"