It depends on the keyboard app you decide to go with. If you decide to go with a heavyweight and inefficient keyboard app, it might make your iPhone lag. While a lightweight and efficient custom keyboard app won't impart any effect on your iPhone's performance.