It isn't faster to do the exp twice, but it ask less shared memory.

In fact, I worked again on this today for code here and found ways to make it even faster. I don't know if I'll be able to update this PR today. Feel free to merge it if you don't see problem with it as it add new feature. I'll make another PR with the faster version