Is there a faster way to calculate Abs[z]^2 numerically?
There's Internal`AbsSquare
:
s = RandomVariate[NormalDistribution[], {10^7, 2}].{1, I};
foo = Internal`AbsSquare[s]; // AbsoluteTiming // First
murf = Abs[s]^2; // AbsoluteTiming // First
(*
0.022909
0.063441
*)
foo == murf
(* True *)