Optimizing BoofCV

From BoofCV
Revision as of 07:49, 6 October 2021 by Peter (talk | contribs)
Jump to navigationJump to search

This page discusses how you can optimize BoofCV for your specific application. This includes tips on speed, reducing the size of a jar, and avoiding common mistakes.

Speed: Warming Up Java

One common mistake that people make when dealing with Java in general is not allowing it time to warm up. Basically all modern virtual machine language (like Java) optimize at runtime to make things run faster. Often people who are used to C++ expect the code to be highly optimized and provide a constant runtime. In most real world applications this is a non issue as you aren't constantly starting and stopping the JVM. So if you want to get the most performance keep the JVM running and ignore the first few times it processes an image as it will be 2x or 3x slower.

Speed: Native Code

Jar Size