Interesting. I thought p2pool already paid out on a prorated basis, based on how difficult your share was, regardless of what the target was?
No you set the difficulty in advance. If you aim for a difficulty 1 share, but get a hash that is good enough for a difficulty 10 share, it still only counts as a difficulty 1 share.
When you get a share, it gets added to the share chain and when the next block is hit, you will get a share of that block's payout.
Let's say I submit 6 shares, at these difficulties: 1, 1, 1, 1000, 1000, 1000.
That will pay me about 3003 difficulties worth of work. Now, let's say I change my minimum difficulty to 500. Instead of submitting 6 shares, I submit only 3 shares, at these difficulties: 1000, 1000, 1000. This only pays me about 3000 difficulties worth of work, not 3003. So I have lost a little income here. In case there's something I'm missing.
If you set the difficulty target at 1, you will get around 1 share for every 4 billion hashes and each one will be worth 1 share. However, some will have a hash that is low enough to be a valid difficulty 10 share.
If you set the difficulty target to 10, you get 1 share for every 40 billion hashes, but each one of those shares would count for 10.
What happens with hashing is that you (in effect) pick a random number between 0 and a huge number (2 to the power of 256). You need to get an result lower than the target. A difficulty 10 share has a target that is 10 times lower than a difficulty 1 share. This means you are 10 times less likely to hit it.