In your example, if you check the type of n, you can see it is of type Integer. So maybe Integer(s,10) can do the job faster.
In your example, if you check the type of n, you can see it is of type Integer. So maybe Integer(s,10)Integer(s) can do the job faster.
Edit: Changed from Integer(s,10). Thanks to @kcrisman for pointing this out.