JQ Ubuntu Package Performance Boosted 1.9x by Reassurance

published the results of evaluating the impact on the performance of packets for Ubuntu with various options and implementation of memory allocation functions. The experimenter managed to increase the performance of the package jq with a tool processing in JSON format, by conventional resources from the same package with the source code, without making changes to the code itself. The performance was evaluated through the measurement of the time of the typical filter request over GEOJSON data, the size of 500MB.

The results of the experiment:

  • The option assembled in the GCC from the same initial texts with flags by default turned out to be faster than the Ubuntu binary package by 2-4%.
  • Passing in Clang 18 with the level of optimization “-O3”, the inclusion of optimization at the stage of binding (“-flto”) and the turning off of the counter information (“-Dndebug”) led to an acceleration of 20%.
  • Passing with the memory distribution system tcmallc (adding “-l/usr/lib/x86_64-linux-ltcmalloc_minimal” in ldflags) led to acceleration by 40%.
  • Replacement of malloc functions with memory distribution systems tcmallo, jemallloc, and mimalloc through “LD_PRELOAD=/USR/LIB/X86_64-Linux-GNU/LIB …. So” led to an increase in performance by 27%, 29% and 44%. When launching with Mimalloc, which showed an acceleration of 44%, the encirclement “mimalloc_large_os_pages = 1” was exhibited.
  • Package with Mimalloc in LDFlags instead of binding via LD_PRELOAD led to an acceleration of the test by 90%. Another test for processing 2.2GB JSON-data in 13,000 files also showed a performance increase by about doubled.
/Reports, release notes, official announcements.