Please see the Handbook's Firewalls section, specifically the section on IPFW Overhead & Optimization.