chauncy-crib / tagprobot

A bot to play TagPro.
4 stars 1 forks source link

Our own A* implementation is about 15x slower than the library we used #190

Open davidabrahams opened 7 years ago

davidabrahams commented 7 years ago

Really rough test. I ran it by console logging the amount of time it took for the bot to calculate its path. I then navigated the bot to the center flag, and then checked how long it took for it to find a path to the endzone.

The library implementation took ~1ms, our implementation took about ~15ms, per path calculation.

My guess is the reason is one of the following:

-we're creating lots of objects -our hash functions are slow (to hash an array, we cast to string and let javascript handle the rest. That's probably bad.)

PrimePalaver commented 7 years ago

Hopefully going to be closed by #205