Skip to content

Very very slow on Lenovo Yoga Tab Plus, Termux #31

Description

@merkalev

Description

Device: Lenovo Yoga Tab Plus (TB520FU)
CPU: Snapdragon 8 Gen 3
RAM: 12 GB LPDDR5X
OS: Android 16 (Termux environment)
Architecture: aarch64 (ARMv8)
Python: 3.14.6
WIMF Version: 2.2.0 (C++ native build)
SIMD: scalar (NEON not active)

Steps to reproduce:

  1. Installed WIMF on Termux via pip install -e . --no-build-isolation
  2. Patched third_party/zstd/zstd.c to handle Android Bionic's missing qsort_r
  3. Built successfully with native C++ extension
  4. Ran wimf_only_benchmark.py --input originals --threads 8
  5. Observed extremely slow performance across all presets

Actual behavior:

  • C++ native extension is active ("native": true)
  • SIMD path is "scalar" (NEON not being used)
  • Encoding is significantly slower than expected for Snapdragon 8 Gen 3
  • Q10 Fast took several minutes

Expected behavior:

  • NEON should be detected and used
  • Performance should be at least 2-3× faster with NEON

Additional context:

  • Android Bionic lacks qsort_r, which required patching Zstandard
  • The patch works, but performance is still poor
  • This may be due to NEON not being enabled in the build or runtime detection

Attachments:

  • wimf.runtime_info() output:
{
  "architecture": "aarch64",
  "simd": "scalar",
  "native": true,
  "codec_version": "2.2",
  "effective_threads": 8
}

Related issues:

  • Zstandard qsort_r compatibility on Android
  • NEON detection/usage in WIMF

Priority: High (ARM/mobile is a key target platform)

Suggested fixes:

  • Investigate NEON build flags for aarch64
  • Check runtime NEON detection in WIMF
  • Verify pybind11 build configuration for ARM SIMD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions