How to increase the Java stack size?

后端 未结 9 1626
余生分开走
余生分开走 2020-11-22 01:59

I asked this question to get to know how to increase the runtime call stack size in the JVM. I\'ve got an answer to this, and I\'ve also got many useful answers and comments

9条回答
  •  情深已故
    2020-11-22 02:25

    Other posters have pointed out how to increase memory and that you could memoize calls. I'd suggest that for many applications, you can use Stirling's formula to approximate large n! very quickly with almost no memory footprint.

    Take a gander at this post, which has some analysis of the function and code:

    http://threebrothers.org/brendan/blog/stirlings-approximation-formula-clojure/

提交回复
热议问题