how to choose the jvm heap size?

My question is how to choose the min and max values, and the difference between the two (should max-min be small or big?) Short answer: don’t guess, profile your application. jconsole can give you useful high-level data such as a feeling for the main resident set vs. the transient data that we normally allocate and … Read more

Is there any way to allocate a standard Rust array directly on the heap, skipping the stack entirely?

Summary: your benchmark is flawed; just use a Vec (as described here), possibly with into_boxed_slice, as it is incredibly unlikely to be slower than a heap allocated array. Unfortunately, your benchmarks are flawed. First of all, you probably didn’t compile with optimizations (–release for cargo, -O for rustc). Because if you would have, the Rust … Read more