Skip to content

Instantly share code, notes, and snippets.

@drjjmc
Last active August 19, 2017 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drjjmc/9d7759457a6d51f05d92911fbaee31b0 to your computer and use it in GitHub Desktop.
Save drjjmc/9d7759457a6d51f05d92911fbaee31b0 to your computer and use it in GitHub Desktop.
Max memory used by mathematica to generate a factorial.
(* data = { x , MaxMemoryUsed[ByteCount[x!]] 11.0.1 for Linux x86 (64-bit) (September 21, 2016) *)
(* through x=10^10 *)
data = {{10, 56},
{12, 800},
{15, 800},
{19, 800},
{25, 800},
{31, 776},
{39, 800},
{50, 800},
{63, 800},
{79, 800},
{100, 264},
{125, 800},
{158, 800},
{199, 800},
{251, 800},
{316, 776},
{398, 880},
{501, 1072},
{630, 1392},
{794, 1776},
{1000, 2416},
{1258, 21664},
{1584, 27168},
{1995, 38688},
{2511, 47520},
{3162, 59552},
{3981, 77344},
{5011, 92576},
{6309, 119648},
{7943, 151968},
{10000, 183880},
{12589, 230072},
{15848, 291592},
{19952, 361544},
{25118, 449720},
{31622, 591096},
{39810, 745800},
{50118, 942384},
{63095, 1189336},
{79432, 1493200},
{100000, 1869648},
{125892, 2358984},
{158489, 2999456},
{199526, 3808256},
{251188, 4790144},
{316227, 6045392},
{398107, 7659440},
{501187, 9711936},
{630957, 12242328},
{794328, 15484944},
{1000000, 19505752},
{1258925, 25170496},
{1584893, 31490008},
{1995262, 39894688},
{2511886, 50173552},
{3162277, 63451792},
{3981071, 80382728},
{5011872, 101746304},
{6309573, 128590144},
{7943282, 163330792},
{10000000, 206477432},
{12589254, 262882904},
{15848931, 331942832},
{19952623, 419226504},
{25118864, 531066416},
{31622776, 674988496},
{39810717, 851461880},
{50118723, 1081772264},
{63095734, 1368389928},
{79432823, 1729475512},
{100000000, 2195109288},
{125892541, 2783204984},
{158489319, 3521806112},
{199526231, 4454780144},
{251188643, 5643883736},
{316227766, 7154343000},
{398107170, 9057776912},
{501187233, 11479044752},
{630957344, 14532842568},
{794328234, 18398616112},
{1000000000, 23311655104},
{1258925411, 29519574792},
{1584893192, 37404395816},
{1995262314, 47369471056},
{2511886431, 59956997392},
{3162277660, 75963576760},
{3981071705, 96180248328},
{5011872336, 121830360536},
{6309573444, 154293267576},
{7943282347, 195399783840},
{10000000000, 247457123816}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment