Is it possible to force an existing Java application to use no more than x cores?

It’s called setting CPU affinity, and it’s an OS setting for processes, not specific to Java. On Linux: http://www.cyberciti.biz/tips/setting-processor-affinity-certain-task-or-process.html On Windows: http://www.addictivetips.com/windows-tips/how-to-set-processor-affinity-to-an-application-in-windows/ On Mac it doesn’t look like you can set it: https://superuser.com/questions/149312/how-to-set-processor-affinity-on-os-x

What is the fastest way to output large DataFrame into a CSV file?

Lev. Pandas has rewritten to_csv to make a big improvement in native speed. The process is now i/o bound, accounts for many subtle dtype issues, and quote cases. Here is our performance results vs. 0.10.1 (in the upcoming 0.11) release. These are in ms, lower ratio is better. Results: t_head t_baseline ratio name frame_to_csv2 (100k) … Read more

Entity Framework initialization is SLOW — what can I do to bootstrap it faster?

In pre EF6 view generation is known to be slow for bigger models. For now the solution is to use pregenerated views. This way you generate views at design time and are avoiding this work at runtime. To do that download EF power tools and select “Optimize Entity Data Model”. It will add a C# … Read more

Is there a memory-efficient replacement of java.lang.String?

With a Little Bit of Help From the JVM… WARNING: This solution is now obsolete in newer Java SE versions. See other ad-hoc solutions further below. If you use an HotSpot JVM, since Java 6 update 21, you can use this command-line option: -XX:+UseCompressedStrings The JVM Options page reads: Use a byte[] for Strings which … Read more

What is the Metadata GC Threshold and how do I tune it?

The log message tells that GC was caused by Metaspace allocation failure. Metaspaces hold class metadata. They have appeared in Java¬†8 to replace PermGen. Here are some options to tune Metaspaces. You may want to set one or several of the following options: -XX:MetaspaceSize=100M Sets the size of the allocated class metadata space that will … Read more

How much overhead can the -fPIC flag add?

It turns out that when you compile without the -fPIC option multiplyComplex, sqComplex, isInSet and isMandelbrot are inlined automatically by the compiler. If you define those functions as static you will likely get the same performance when compiling with -fPIC because the compiler will be free to perform inlining. The reason why the compiler is … Read more