Andre said:
The trick is to get as close to the peak again when you hit the next gear, so you probably want to go to the redline before shifting. Yes, the HP and torque drop off before redline, but if you shifted at the peak, you'd be way below the peak in the next gear. You have to ride both sides of the peak.
You need to know the engine's power characteristics and the gearing. For most cars, the optimal shift point is a few hundred rpm before redline, and decreases 1-200 RPM as you go up the gears.
You actually need a graph of the engine's powerband and some calculus to figure it out precisely, as you are calculating the area under a curve. However, you can estimate it pretty well if you just pay attention to the road speed at a particular rpm in a particular gear.
For example: My 1994 325i makes peak torque at around 4000 rpm and peak horsepower at around 6300 RPM. When I shift up, I am trying to engage the higher gear at as close to 4000 RPM as possible. That means my 1-2 shift happens at 6500 rpm, 2-3 at 6350, 3-4 at 6200 and 4-5 at around 6050. Each of the gears has its own gear ratio, typically around 3:1 for 1st gear and going to 1:1 for 5th gear.
My NSX is a different story. The gearing is very tall. The 1-2 shift is best at redline, because the gears are spaced such that shifting from 1st at redline (8300 RPM at 45 MPH) will put you in 2nd at about 4300 RPM. For the NSX, you want to be engaging the higher gear at 5000 RPM or so, if not 5800 (VTEC kicks in). The higher gears are closer together, so a few hundred RPM below redline is the way to go. (Of course, if you shift into 4th at redline from 3rd you are going 117 MPH, so it doesn't happen all that often on the street.)
So, once you figure out the 330s torque peak RPM (probably around 4000 RPM), then find out what road speed in MPH that RPM occurs at in 2nd gear. Lets say that is 30 mph. You want to shift from 1-2 at 30mph, so figure out what RPM equals 30 mph in 1st gear. Repeat that for all of the gears and you will be close.