Skip to content Skip to sidebar Skip to footer

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.

enter image description here

Post a Comment for "Js Code Runs Slow On Codepen, Though It Runs Good Locally"