The main purpose of a rib (also know as a vented rib) on a barrel is to prevent heat waves distorting your vision when shooting. A plain barrel after several shots will start to have heat waves.
The "vents" you may be talking about, do you mean the little lines of holes near the end of the barrel? If so, these aren't designed for cooling. These are gas release vents, sometimes known as a muzzle brake. Their purpose is to prevent muzzle jump, and recoil. The idea is that the gas's forced out of these vent holes will push your muzzle down, at the second your shot leaves the barrel, so it dosen't jump up as much. This helps you get the gun back on your next target,( or for a second shot on your first) without having to re-level the gun as much. They tend to be a feature most often found on field guns, although some range shooters are using them as well, do to the reduced recoil.
I have one gun with them, and one without. I like them, but they are a lot louder, and you better have your ear plugs in!! :shock: