php-judy three-arm benchmark
  A  PHP native array
  B  php-judy + system libJudy  : /work/builds/judy-B-1.so, /work/builds/judy-B-2.so, /work/builds/judy-B-3.so
  C  php-judy + bundled libJudy : /work/builds/judy-C-1.so, /work/builds/judy-C-2.so, /work/builds/judy-C-3.so
  timing core.int     round 1/7
  timing core.int     round 2/7
  timing core.int     round 3/7
  timing core.int     round 4/7
  timing core.int     round 5/7
  timing core.int     round 6/7
  timing core.int     round 7/7
  timing core.int     done          
  timing api.batch    round 1/7
  timing api.batch    round 2/7
  timing api.batch    round 3/7
  timing api.batch    round 4/7
  timing api.batch    round 5/7
  timing api.batch    round 6/7
  timing api.batch    round 7/7
  timing api.batch    done          
  timing api.setops   round 1/7
  timing api.setops   round 2/7
  timing api.setops   round 3/7
  timing api.setops   round 4/7
  timing api.setops   round 5/7
  timing api.setops   round 6/7
  timing api.setops   round 7/7
  timing api.setops   done          
  timing adv.iter     round 1/7
  timing adv.iter     round 2/7
  timing adv.iter     round 3/7
  timing adv.iter     round 4/7
  timing adv.iter     round 5/7
  timing adv.iter     round 6/7
  timing adv.iter     round 7/7
  timing adv.iter     done          
  memory int_to_int     n=6000000   A=129.6 MB   B=49.5 MB    C=49.7 MB     A/C=2.61x
  memory int_sparse     n=6000000   A=290.5 MB   B=74.6 MB    C=74.8 MB     A/C=3.88x
  memory int_to_mixed   n=6000000   A=192.0 MB   B=232.5 MB   C=232.9 MB    A/C=0.82x
  memory string_to_int  n=6000000   A=477.2 MB   B=138.2 MB   C=138.4 MB    A/C=3.45x
  memory bitset         n=6000000   A=290.5 MB   B=10.1 MB    C=10.3 MB     A/C=28.17x

------------------------------------------------------------------------------------------------
php-judy three-arm benchmark — linux-x86_64-gcc14.2-php8.4-out-of-cache-6M
------------------------------------------------------------------------------------------------
  PHP 8.4.24, Linux x86_64
  arm B system libJudy : Debian 13 trixie (Debian GNU/Linux 13), libjudy-dev 1.0.5-5.1 SHARED lib; Baskins jp_1Index fix APPLIED (debian patch 04); dpkg hardening CFLAGS
  arm C bundled libJudy: bundled libjudy/ static into the extension (P1-P7, O1 popcount, O3 bswap, O4 string-layer); vendor CFLAGS -O2 -fno-lto -fno-unroll-loops -mpopcnt
  size 6000000 (out-of-cache), 7 rounds, 3 iterations, floor 1.3%
  same-source attested : yes

  host hygiene
    start          load1=1.22   cpus=24   threshold=12.0  foreign=  0.0% ok
    after-timing   load1=1      cpus=24   threshold=12.0  foreign=  0.0% ok
    after-memory   load1=1      cpus=24   threshold=12.0  foreign=  0.0% ok
    end            load1=1      cpus=24   threshold=12.0  foreign=  0.0% ok

  control (PHP-only rows, touch no libJudy): -0.04% [-0.11, +0.02] over 21 rows
  measured control scatter: 1.26%  (assumed floor 1.3%)

------------------------------------------------------------------------------------------------
  MEMORY — peak RSS over per-arm empty-process floor (the headline axis)
------------------------------------------------------------------------------------------------
  workload                n      A array     B system    C bundled       A/C       B/C
  int_to_int        6000000     129.6 MB      49.5 MB      49.7 MB     2.61x     1.00x
  int_sparse        6000000     290.5 MB      74.6 MB      74.8 MB     3.88x     1.00x
  int_to_mixed      6000000     192.0 MB     232.5 MB     232.9 MB     0.82x     1.00x
  string_to_int     6000000     477.2 MB     138.2 MB     138.4 MB     3.45x     1.00x
  bitset            6000000     290.5 MB      10.1 MB      10.3 MB    28.17x     0.98x
  A/C above 1.00 means the PHP array uses that many times more memory than php-judy.

------------------------------------------------------------------------------------------------
  B vs C — bundled libJudy against system libJudy (this project's contribution)
  ratio < 1 means the bundled tree is faster. Only rows whose whole CI clears
  the 1.3% floor assert anything; everything else is null.
------------------------------------------------------------------------------------------------
  benchmark                                     system   bundled    delta CI                 verdict
  api.range.size.string_to_int                   36.53     20.89  -42.87% [-44.56,-42.62] FASTER
  adv.optiter.values.string_to_int_hash.optimized     16.14     10.56  -34.58% [-34.83,-34.49] FASTER
  adv.optiter.foreach.string_to_int_adaptive.optimized     21.21     13.99  -33.99% [-34.03,-31.63] FASTER
  adv.optiter.foreach.string_to_int_hash.optimized     19.13     12.89  -32.61% [-33.27,-30.82] FASTER
  adv.optiter.values.string_to_int_adaptive.optimized     18.09     12.40  -31.38% [-31.54,-31.16] FASTER
  adv.forEach.string_to_int                     505.87    354.26  -29.87% [-30.12,-29.78] FASTER
  api.equals.int_to_int                          97.91     71.47  -27.04% [-27.60,-26.78] FASTER
  api.setop.intersect.int_to_int                147.87    109.02  -26.29% [-26.37,-26.20] FASTER
  api.fromArray.int_to_int                      170.85    126.90  -26.10% [-26.60,-25.46] FASTER
  api.putAll.int_to_int                         170.94    126.66  -25.89% [-26.46,-25.56] FASTER
  api.setop.intersect.bitset                    116.79     87.03  -25.35% [-25.68,-25.21] FASTER
  api.deleteRange.int_to_int                    316.03    236.62  -25.07% [-25.20,-24.98] FASTER
  adv.map.string_to_int                        1419.42   1065.59  -24.89% [-25.03,-24.77] FASTER
  api.setop.union.int_to_int                    354.05    266.24  -24.84% [-24.99,-24.73] FASTER
  api.setop.union.bitset                        242.28    182.38  -24.68% [-24.73,-24.28] FASTER
  adv.optiter.ratio.foreach.string_to_int_adaptive     61.74     46.79  -23.97% [-25.22,-23.11] FASTER
  core.int_to_int.write                         190.24    144.70  -23.87% [-23.93,-23.47] FASTER
  api.setop.diff.bitset                         113.03     86.20  -23.60% [-23.88,-23.54] FASTER
  api.setop.xor.bitset                          225.05    172.93  -23.05% [-23.37,-22.83] FASTER
  adv.filter.string_to_int                     1012.64    778.90  -23.04% [-23.25,-22.88] FASTER
  api.setop.diff.int_to_int                     140.11    107.86  -22.98% [-23.08,-22.96] FASTER
  api.setop.xor.int_to_int                      280.26    216.41  -22.70% [-22.77,-22.62] FASTER
  api.setop.intersect.string_to_int             845.99    655.09  -22.44% [-22.62,-22.24] FASTER
  api.mergeWith.int_to_int                      384.37    302.63  -21.30% [-21.79,-21.11] FASTER
  adv.optiter.values.string_to_int_hash.default     26.22     20.62  -21.22% [-21.44,-21.09] FASTER
  adv.optiter.toArray.string_to_int_hash.optimized     22.78     17.99  -21.09% [-21.24,-20.75] FASTER
  adv.optiter.toArray.string_to_int_adaptive.optimized     27.48     21.71  -21.04% [-21.13,-21.03] FASTER
  api.setop.diff.string_to_int                  853.45    676.53  -20.65% [-20.96,-20.46] FASTER
  adv.optiter.ratio.values.string_to_int_adaptive     53.59     42.43  -20.63% [-20.97,-20.31] FASTER
  api.mergeWith.string_to_int                  1500.23   1191.60  -20.34% [-20.77,-20.22] FASTER
  adv.optiter.foreach.string_to_int_hash.default     27.67     22.05  -20.29% [-20.36,-20.06] FASTER
  api.increment.int_to_int                      179.25    144.79  -19.84% [-20.78,-18.96] FASTER
  api.setop.union.string_to_int                1797.44   1455.97  -19.02% [-19.38,-18.84] FASTER
  api.sumValues.int_to_int                       58.76     48.56  -17.24% [-17.95,-17.07] FASTER
  adv.optiter.ratio.values.string_to_int_hash     61.55     51.17  -16.87% [-17.30,-16.69] FASTER
  core.int_to_int.read                           79.77     66.98  -15.97% [-16.20,-15.89] FASTER
  adv.optiter.ratio.foreach.string_to_int_hash     69.15     58.41  -15.67% [-16.32,-14.32] FASTER
  adv.optiter.toArray.string_to_int_hash.default     34.41     29.34  -14.69% [-15.01,-14.42] FASTER
  core.int_to_packed.free                        61.04     52.08  -14.68% [-15.18,-14.42] FASTER
  adv.optiter.values.string_to_int_adaptive.default     33.76     29.22  -13.48% [-13.70,-13.35] FASTER
  core.bitset.write                             116.83    103.08  -12.03% [-12.12,-11.79] FASTER
  core.int_to_mixed.read                        314.79    278.28  -11.89% [-12.73,-11.48] FASTER
  adv.optiter.ratio.toArray.string_to_int_adaptive     62.29     55.01  -11.82% [-12.21,-10.91] FASTER
  adv.optiter.foreach.string_to_int_adaptive.default     34.33     30.21  -11.80% [-12.80,-11.04] FASTER
  adv.optiter.increment.string_to_int_hash.optimized     21.49     19.06  -11.22% [-11.74,-10.99] FASTER
  adv.optiter.overwrite.string_to_int_hash.optimized     21.20     18.92  -10.74% [-11.07,-10.56] FASTER
  adv.optiter.toArray.string_to_int_adaptive.default     44.14     39.50  -10.46% [-10.98,-10.07] FASTER
  api.getAll.int_to_int                          23.71     21.36  -10.03% [-10.19, -9.56] FASTER
  adv.map.int_to_int                            327.96    297.36   -9.37% [ -9.77, -8.77] FASTER
  core.int_to_mixed.write                       438.44    398.65   -9.03% [ -9.30, -8.44] FASTER
  adv.filter.int_to_int                         301.28    274.78   -9.01% [ -9.59, -8.72] FASTER
  core.int_to_packed.write                      379.44    347.02   -8.48% [ -8.50, -8.25] FASTER
  api.range.keys.int_to_int                      10.98     10.04   -8.30% [ -8.83, -7.89] FASTER
  adv.optiter.ratio.overwrite.string_to_int_hash    126.05    116.29   -7.60% [ -8.22, -6.32] FASTER
  api.keys.int_to_int                           125.52    115.89   -7.54% [ -7.66, -7.35] FASTER
  adv.optiter.ratio.toArray.string_to_int_hash     66.21     61.30   -7.45% [ -7.63, -7.15] FASTER
  api.values.int_to_int                         130.35    120.81   -7.36% [ -7.70, -7.15] FASTER
  core.bitset.iter                              115.93    107.30   -7.33% [ -8.58, -6.75] FASTER
  adv.optiter.ratio.increment.string_to_int_hash    127.14    117.65   -7.24% [ -7.97, -6.74] FASTER
  core.int_to_int.iter                          122.01    113.10   -7.14% [ -7.82, -6.66] FASTER
  core.int_to_mixed.free                        107.93    100.20   -7.12% [ -7.66, -6.64] FASTER
  core.int_to_mixed.iter                        344.91    321.02   -6.89% [ -7.27, -6.59] FASTER
  api.toArray.int_to_int                        317.93    297.58   -6.72% [ -6.93, -6.01] FASTER
  core.int_to_packed.iter                       261.50    247.72   -5.46% [ -5.48, -5.04] FASTER
  adv.optiter.overwrite.string_to_int_adaptive.optimized     27.66     26.17   -5.33% [ -5.54, -4.93] FASTER
  adv.forEach.int_to_int                        198.67    188.48   -5.14% [ -5.84, -4.08] FASTER
  core.bitset.read                               71.06     67.56   -4.73% [ -5.58, -4.68] FASTER
  core.int_to_packed.read                       215.21    205.49   -4.57% [ -4.94, -4.27] FASTER
  adv.optiter.increment.string_to_int_hash.default     16.95     16.22   -4.24% [ -4.51, -4.10] FASTER
  adv.optiter.ratio.overwrite.string_to_int_adaptive    111.24    106.75   -3.96% [ -4.37, -3.60] FASTER
  adv.optiter.overwrite.string_to_int_hash.default     16.83     16.26   -3.24% [ -3.87, -2.98] FASTER
  adv.optiter.overwrite.string_to_int_adaptive.default     24.85     24.49   -1.52% [ -1.69, -1.09] null
  core.int_to_int.free                            2.10      2.09    1.09% [ -0.30, +2.04] null
  totals: 71 faster, 0 slower, 2 null

------------------------------------------------------------------------------------------------
  A vs C — PHP native array against php-judy (bundled)
  Only rows whose PHP arm is a genuine PHP array. judy/array above 1.00 means
  the PHP array is FASTER — publish these, they are the honest half of the story.
------------------------------------------------------------------------------------------------
  benchmark                                   array ms   judy ms  judy/arr winner
  core.bitset.free                                5.01      0.02     0.00x php-judy
  core.int_to_int.free                            5.45      2.09     0.38x php-judy
  api.setop.xor.bitset                          221.28    172.93     0.78x php-judy
  api.setop.intersect.bitset                     95.43     87.03     0.91x php-judy
  core.int_to_packed.free                        46.82     52.08     1.11x php-array
  core.bitset.write                              88.95    103.08     1.16x php-array
  core.int_to_packed.write                      246.65    347.02     1.41x php-array
  core.int_to_mixed.write                       264.27    398.65     1.51x php-array
  core.int_to_int.write                          91.95    144.70     1.57x php-array
  core.int_to_packed.read                       106.64    205.49     1.93x php-array
  api.setop.union.bitset                         92.29    182.38     1.98x php-array
  api.setop.diff.bitset                          42.95     86.20     2.01x php-array
  core.int_to_mixed.free                         46.01    100.20     2.18x php-array
  core.int_to_mixed.read                        120.97    278.28     2.30x php-array
  api.increment.int_to_int                       57.42    144.79     2.52x php-array
  core.int_to_int.read                           22.22     66.98     3.01x php-array
  core.bitset.read                               21.92     67.56     3.08x php-array
  core.int_to_mixed.iter                         85.37    321.02     3.76x php-array
  core.bitset.iter                               18.74    107.30     5.72x php-array
  core.int_to_int.iter                           18.66    113.10     6.06x php-array
  core.int_to_packed.iter                        21.40    247.72    11.57x php-array
  totals: php-judy wins 4, PHP array wins 17, parity 0

Wrote /work/results/run6-out-of-cache-6m.json
