I had a long talk with my mentor today about this topic. By the way, this teacher of mine is a virtuoso in my book because of his technicality and speed. He's quite well known here in Bacolod. Anyway, I asked him how to gain speed. His answer was very very long, and it also involved philosophy. To summarize his answer, he said speed is just a bi-product of form and endurance. He emphasized form first and proper picking technique. Learn your scales and appregios by heart. Make sure your fingers land exactly at the middle of the frets. Be aware of the proper fingering. Next is endurance. Practicing constantly for long periods of time will develop endurance. He also gave me an analogy that guitar playing is similar to sports, lets say basketball. Your body develops certain specialized muscles for specialized movement. Again, this is due to long hours of playing.
Lastly, he said that there are guitar players who are really gifted to be super fast. He compared Clapton to Malmsteen, but he had a different point. He said that hitting a single note, while expressing all your feelings, is just equal to hitting a long scale run, with extreme speed. Darn i could not drive exactly to his point, but its more philosophical than technical.