If you're looking for a router that does NAT you're not going to beat a purpose built hardware board in terms of perf per dollar, especially only latency and jitter of the NAT.
If you're looking for a network connected server that happens to do a lot of packet processing you can go the rpi route but I'd still front the internet and rest of the home internet off a small cheap hardware box like the Hex.
If you're looking for a network connected server that happens to do a lot of packet processing you can go the rpi route but I'd still front the internet and rest of the home internet off a small cheap hardware box like the Hex.