I am optimizing the scripts of my game, because my platform is in mobile I am really squeezing every part that can be optimize, what do you think?
try to make functions instead of running everything in updates, avoid on gui function.keep calculation related things in Fixedupdate.if you want to do the same thing then you should go for mathf.clamp,its unity function and runs internally and your function will take extra time and of cpu.