I've written a small library that gives a steady distance reading (in cm) of Sharp IR sensors. It works for the GP2Y0A21YK and GP2Y0A02YK, but it easy enough to expand it for the rest of the sensor family.
What the library does is to get a bunch of readings and, if one reading is close enough to the previous reading it takes it into account to calculate an average distance.
In my tests to set it to use 25 readings to calculate the average, it takes aprox 53 ms. The averaged distance matches quite well to the actual measured distance. The time taken is fast enough for the application I give to the sensors, I hope it's usufull to somebody else.
It can be found here: http://playground.arduino.cc//Main/SharpIR
hope you like it.