What you are looking for is the best gear to use to get you around the track the fastest. Seems logical but what you want to do is start with what Steen suggested. Highest RPM at the end of the longest straight. Then drop a couple of teeth and see if your lap time drops, if it doesn’t do the same thing but go the other way, add a couple of teeth and re-test. Many times you will find that you will need to ” stretch” the engine down the straight because you need the gearing to get you out of the slower turns. Its really about overall elapsed time of the lap, not the highest top speed. If the track is tight and twisty with one long straight, then usually over-revving is the way to go, if the track is all medium speed corners with medium to long straights then going smaller on the gear usually works out better. Best of luck.