Depends on the gun. A smaller gun with a shorter barrel I would lean towards a lighter bullet to get the velocity up enough to expand.
9mm velocites are not effected much by barrel length. I've generally seen about a 100 fps difference between a 3.5" barrel and a 5" barrel. The modern bullet designs of today have a much wider upset velocity range then the difference you will see in fps from using a shorter barrel. Mind you this is just talking about 9mm. Other calibers have their own characteristics.