valuesOld = {5, 10, 15, 20, 25, 35, 40, 45, 55, 65, 80};
valuesNew1 = Sqrt[{#, #} & /@ valuesOld];
valuesNew2 = {#, #} & /@ Sqrt[valuesOld];
valuesNew3 = Table[{i, i}, {i, Sqrt[valuesOld]}];
valuesNew4 = Transpose[Sqrt[{#, #}]]& @ valuesOld;
valuesNew5 = valuesOld /. x_Integer :> ({1, 1} Sqrt[x]);
valuesNew6 = valuesOld /. x_ :> Sqrt[{x, x}] // Transpose;
Equal @@ {valuesNew1, valuesNew2, valuesNew3, valuesNew4, valuesNew5, valuesNew6}
(* True *)
valuesNew1
{{Sqrt[5], Sqrt[5]}, {Sqrt[10], Sqrt[10]}, {Sqrt[15], Sqrt[15]},
{2 Sqrt[5], 2 Sqrt[5]}, {5, 5}, {Sqrt[35], Sqrt[35]}, {2 Sqrt[10], 2 Sqrt[10]},
{3 Sqrt[5], 3 Sqrt[5]}, {Sqrt[55], Sqrt[55]}, {Sqrt[65], Sqrt[65]},
{4 Sqrt[5], 4 Sqrt[5]}}
Timings:
vN1 = Sqrt[{#, #} & /@ #] &;
vN2 = {#, #} & /@ Sqrt[#] &;
vN3 = Table[{i, i}, {i, Sqrt[#]}] &;
vN4 = Transpose[Sqrt[{#, #}]] &@# &;
vN5 = # /. x_Integer :> ({1, 1} Sqrt[x]) &;
vN6 = (# /. x_ :> Sqrt[{x, x}] // Transpose) &;
vNR = Replace[#, x_ :> {Sqrt[x], Sqrt[x]}, {1, Infinity}] &; (* RunnyKine *)
vNM = Sqrt /@ {#, #} & /@ # &; (* mete *)
vNA = Append[{Sqrt[#]}, Sqrt[#]] & /@ # &; (* algohi *)
vNW = {#, #}\[Transpose] &@Sqrt[#] &; (* Mr.Wizard -- suggested in comments *)
functions = {vN1, vN2, vN3, vN4, vN5, vN6, vNR, vNM, vNA, vNW};
flabels = {"vN1", "vN2", "vN3", "vN4", "vN5", "vN6", "vNR", "vNM", "vNA","vNW"};
vO1 = RandomInteger[1000, {10000}];
vO2 = RandomInteger[1000, {100000}];
vO3 = RandomInteger[1000, {1000000}];
{Equal @@ (#@vO1 & /@ functions),Equal @@ (#@vO2 & /@ functions), Equal @@ (#@vO3 & /@ functions)}
(* {True, True, True} *)
aT = AbsoluteTiming;
{#1, First[aT[#2[vO1];]],First[aT[#2[vO2];]], First[aT[#2[vO3];]]} & @@@
Transpose[{flabels, functions }] // Grid[Prepend[#, {"function" , "vO1", "vO2", "vO3"}]] &
Sqrt
beingListable
$\endgroup${#, #}\[Transpose] & @ Sqrt[v]
$\endgroup$