Any kind of physical discomfort can cause your heart rate to go up.
Next Steps
If you are very concerned you can get a holter test which will show what the ECG looks like exactly when you have these fast heartbeat episodes
Health Tips
I suspect it will be fine