No-- the size of a drive will not noticeably affect the drive performance.
However if you are comparing a 40gb and a 500GB in the same laptop you are most likely comparing a Solid State Driver (SSD) with a normal disk hard drive. If it is in fact a solid state drive it will be much faster than a traditional hard-drive, but will have much less room. Solid state drives are MUCH more expensive for the size, but offer lower energy use, small size and greater durability.
Among normal hard drives you can compare RPM speeds. Typically laptops come with either 5400 rpm drives (battery saving, but slower) or 7200 rpm drives (full desktop speed)