I still have a first generation iPhone, and the data connection is slow. But even if I had a more recent device, I'd still have a slow connection here in rural Iowa because there ain't no 3G network in this area. So I was delighted to find out from a friend that I can use my Mac as a wireless router to connect my iPhone to the Internet via Wi-Fi. I can turn it on and then use the wireless access anywhere in the house. It's cheaper and simpler than buying a wireless router. Here's how to do it. First be sure that AirPort is turned on on your Mac by going to System Preferences and clicking Network, then selecting AirPort in the left menu, then clicking Turn AirPort On at right. Then go back to System Preferences and select Sharing. Next select Internet Sharing in the menu at left. That will pop up two additional settings at right. Select Ethernet and select AirPort. Then back at the list on the left, click the check box by Internet Sharing. Then turn on WiFi on your iPhone or iPod touch by going to that device's Preferences and selecting WiFi. Your computer should then show up under Choose a Network. Select it, and you'll be connected to the Internet via WiFi.
If you don't feel comfortable having an open network, such that others can then also use your Mac's wireless network to connect to the Internet, you can restrict access by requiring a password. You do this by clicking on AirPort options before checking the Internet Sharing box. It will then give you a dialog box in which you can configure the security.
You need to be cautious using this Sharing feature, though. I once turned on Sharing so that I could connect my Windows Mobile device to the Internet. In this case, I selected sharing from Ethernet and sharing to computers using Ethernet. Big mistake. My computer ended up assigning IP numbers to computers on the campus network, causing network-wide problems. So be careful with this. But there shouldn't be a problem sharing via AirPort.