REGR: Avoid overflow with groupby sum
This is the alternative to #48044.

I would very much prefer this one, even though it is a bit slower.

cc @mroeschke cc @jorisvandenbossche 
I would be okay with this version of the change > even though it is a bit slower.

Do you have a rough estimate of how much slower? 

I certainly think this version is good enough (in the end, before we were casting as well, to float64), but if it is a significant difference, we can still table it as a future possible improvement if we find a better way to avoid the many compilation combinations Around 5% of the ``.sum()`` runtime is taken up by the astype call. So no big deal (1_000_000 values)

Memory footprint is something that would make it worth, if we can avoid the duplications.

But for now, this should be sufficient since we were castint to float anyway Will open an issue, after this is merged. Thanks joris

If ok, I would merge when ci is greenish Go ahead! Failures unrelated