This months edition of Elektor magazine has an article on the sharp rangefinder along with a few tips listed below:
They are using the GP2Y0A02YK0F (20cm - 150cm).
Whenever the rangefinder blinks its IR LED it emits very short powerful pulses, this creates a high peak load on the power supply. They recommend connecting an electrolytic capacitor (10uf - 100uf) between the +5v and GND as close to the rangefinder as possible. (in their article they solder a smd capacitor directly to the exposed circuit board on the rangefinder; they also mention they cant understand why Sharp never added this improvement themselves before selling them). Once the ripples in the power supply are gone, it stops interfering with the signal wire resulting in a smoother output.
The ccd array has around 100pixels which gives the rangefinder a resolution of 20mv changes. Apparently, a small ripple voltage is superimposed on the output signal of the same amplitude so they recommend using a low pass filter. They also use a voltage divider in conjunction with the low pass filter. This means the output voltage is 2.4v rather than the usual 2.7v at 20cm (because of the resolution of the sensor it doesnt really matter, and the benefit is a much more stable signal with less spikey bits on the sillyscope

)

Vin = signal from rangefinder
R1 = 6.8K resistor (6K8)
R2 = 4.7K resistor (4K7)
C = 1uf (electrolytic judging by the pictures)
Vout = to microcontroller adc pin
GND = GND
Those are the main hardware tips.
On the software side, they recommend using a look up table for for speed but for anybody wanting to do the math here is their recommended equation:
For sampling using the voltage divider circuit above:
Distance = (0.008271 + 909.6 x Us) / (1 - 3.398 x Us + 17.339 x Us x Us)
or sampling the signal without any additions:
Distance = (0.008271 +939.6 x Us) / (1 - 3.398 x Us +17.339 x Us x Us)
**where Us is the input voltage.
so for a 10bit adc: input voltage = (5 / 1023) * ADC reading
The mention the reason the voltage output isnt linear is because its based on the trig functions in the rangefinder.
Just thought Id share this with everone