I only ride on the sidewalk if traffic is packed and there's no filtering room. Once I'm on, I don't think I go much faster than 5mph because I can never judge how peds are going to react. I try and ride on the sidewalk as little as possible (probably in part because it's illegal).