If you have 40 STR, then you might as well consider yourself as having 60 STR for this weapon, since you'll rarely ever 1-hand it. And, for a fair comparison, the hypothetical dex build would have to 2-hand it, so we need to consider it 2-handed in the str build as well. So, it has 471 AR at 40/12 while 2-handed, significantly better than the 428 dex equivalent.
Note that both of these values are very weak for a great weapon, the next weakest great hammer has 520 AR and some go beyond 600 for the str build. If you absolutely must use a light, low-str great weapon on your dex build, I would suggest Zweihander over this, which has almost 100 more AR than the mallet at 522 (the heavy version is still better at 552).
tl;dr, don't forget the 2-handed str bonus when compared heavy to sharp.