Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android_jni: Set threads to 2 instead of CPU count #2472

Merged
merged 1 commit into from
Oct 9, 2024

Commits on Oct 9, 2024

  1. android_jni: Set threads to 2 instead of CPU count

    Empirically, on Android devices with more than 1 core, it is
    almost always better to use 2 threads than to use
    number_of_cpu_cores threads.
    
    Update the public java API function documentation to reflect this
    change.
    
    The new behavior is:
    * negative values map to number of cpu cores.
    * zero maps to 1 or 2 depending on single core or multi core devices.
    * value >=0 maps to value.
    
    This change ensures that users who use the library via JNI take the
    optimal path when using the default value of 0.
    vigneshvg committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    530828c View commit details
    Browse the repository at this point in the history