To lower the burden to the Lua interpreter make computing easier and faster by:
Presumably, players will tend to use most frequently the tools with high wearout over ones with low wear to enjoy the positive effects of toolrank.
The function toolranks.new_afteruse is called for every use of the certain tools used by the player. The function toolranks.get_level(uses) is called from toolranks.new_afteruse every time by default.
Hope this helps.
Using 1 billion iterations:
wear = digparams.wear / (1 + level / 4) [2.3442 seconds]
wear = digparams.wear * 4 / (4 + level) [2.0184 seconds]
Negligible change in speed but hey, will make the change :) Thanks :P
N.B. The factor is 0.86 so almost 14 % faster (or better as there should be an overhead deductable from both rates).