I did some poking around and didn't see an answer... and I figure someone knows this off the top of their head.
Question: what is the gas cost associated with setting and deleting a storage variable in the same transaction? Since at the end of the tx, there is no new state, I vaguely recall reading once that the gas costs are different. Can anyone confirm this or point me at the documentation for this?
If there's no special treatment, I'd expect this to cost 20k (set) + 5k (delete) - 15k (refund) = 10k per variable, which is a lot...
Edit: to clarify, my hope is to have a mapping which I can use for essentially "flash storage" during a single tx. To my knowledge there is no
memory equivalent of mappings, as they only exist in storage, which is why I don't think there's an alternative which uses only local variables.