PERF: Series.transform speedups (GH6496)