A person who gives charity to a poor person performs a mitzva action, and no matter how he performs that action, it will have the value of a mitzva; it will exist upon the positive scale of mitzvot.
At the same time, the intensity of the mitzva is not always uniform but is measured according to the underlying intent with which it was performed.
The effort, the soul, that the person invested in attaining the money that he is giving to charity, how much he gives and how he gives, are taken into consideration.
One can give charity with a sour expression or with a caring smile.
In either case, the mitzva is a mitzva, and the coin is a coin.
Yet there is a great difference in the level, and consequently in the intensity, with which the mitzva impacts all the
worlds.
In this way, through the power of intent, the mitzva of one’s giving even a small coin to charity can accomplish more
than the giving of a mountain of gold by someone else.
Rabbi Adin Steinsaltz