Skip to content

chore: bump version to 2.4.0#42

Open
orieg wants to merge 1 commit intomainfrom
release/v2.4.0
Open

chore: bump version to 2.4.0#42
orieg wants to merge 1 commit intomainfrom
release/v2.4.0

Conversation

@orieg
Copy link
Owner

@orieg orieg commented Feb 28, 2026

Summary

  • Bumps PHP_JUDY_VERSION from 2.3.0 to 2.4.0 in php_judy.h
  • Updates package.xml version and release notes for 2.4.0
  • Updates version test expectation in tests/001.phpt

All four phases of the performance overhaul and feature extensions (issue #37) are now complete:

Phase PR Feature
1 #38 Fast ZPP (Zend Parameter Parsing) macros
2 #39 BITSET set operations (union, intersect, diff, xor)
3 #40 Range slicing -- slice($start, $end)
4 #41 JsonSerializable + __serialize/__unserialize

Test plan

  • 85/85 tests pass (Docker PHP 8.3)
  • CI matrix (PHP 8.1-8.5, Linux + Windows)

All four phases of the performance overhaul and feature extensions
(issue #37) are complete:
- Phase 1: Fast ZPP migration (PR #38)
- Phase 2: BITSET set operations (PR #39)
- Phase 3: Range slicing (PR #40)
- Phase 4: JsonSerializable + serialize/unserialize (PR #41)
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request finalizes the judy extension's version 2.4.0 release, incorporating a significant overhaul of performance and feature extensions. It updates all relevant version identifiers and documentation to reflect the new stable release, which includes advanced functionalities like optimized parameter parsing, native object handlers, and improved serialization capabilities.

Highlights

  • Version Bump: The PHP_JUDY_VERSION has been updated from 2.3.0 to 2.4.0 in php_judy.h, and the package.xml file reflects this new version.
  • Release Notes Update: The package.xml now includes detailed release notes for version 2.4.0, outlining several new features and improvements.
  • Test Expectation Update: The test tests/001.phpt has been updated to expect the new 2.4.0 version string.
  • Performance Overhaul & Feature Completion: This release marks the completion of four phases of performance enhancements and feature extensions, including Fast ZPP macros, BITSET set operations, range slicing, and JsonSerializable support.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • package.xml
    • NEW FEATURE: Fast ZPP (Zend Parameter Parsing) macros across all methods for improved performance
    • NEW FEATURE: Native zend_object_handlers (read/write/has/unset_dimension) bypass ArrayAccess overhead
    • NEW FEATURE: Native C iterators via get_iterator for zero-overhead foreach loops
    • NEW FEATURE: BITSET set operations -- union(), intersect(), diff(), xor() methods
    • NEW FEATURE: slice($start, $end) for efficient range extraction on all array types
    • NEW FEATURE: JsonSerializable interface -- json_encode() works natively on Judy arrays
    • NEW FEATURE: __serialize()/__unserialize() for native PHP serialize/unserialize support
    • IMPROVEMENT: 85 tests covering all features
Activity
  • All 85 tests passed successfully on Docker PHP 8.3.
  • CI matrix for PHP 8.1-8.5 (Linux + Windows) is pending.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

Test Results

PHP Platform Arch TS Tests Pass Fail Skip Duration
8.1 Linux x64 - 85 85 0 0 0.7s
8.2 Linux x64 - 85 85 0 0 0.9s
8.3 Linux x64 - 85 85 0 0 0.9s
8.4 Linux x64 - 85 85 0 0 0.9s
8.5 Linux x64 - 85 85 0 0 0.9s
8.1 Windows x64 nts 85 85 0 0 5.2s
8.2 Windows x64 nts 85 85 0 0 5.2s
8.3 Windows x64 nts 85 85 0 0 5.2s
8.4 Windows x64 nts 85 85 0 0 5.3s
8.5 Windows x64 nts 85 85 0 0 5.2s
Total 850 850 0 0

Benchmark Summary (Judy vs PHP Array)

Ratio = Judy / Array. Bold = Judy wins (≤0.95x). Plain = Array is faster/smaller.

Time (Write / Read) — Linux

Scenario PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K 3.0x / 2.7x 3.1x / 2.7x 3.1x / 2.6x 3.0x / 2.7x 2.0x / 2.8x
Sparse Int 500K 3.7x / 3.0x 3.4x / 2.8x 3.3x / 2.8x 3.2x / 3.5x 3.2x / 4.8x
Sparse Int 1M 3.7x / 2.7x 4.0x / 2.5x 3.8x / 2.4x 3.3x / 2.3x 3.8x / 3.3x
Sparse Int 10M 2.0x / 2.4x 2.2x / 2.5x 1.9x / 2.3x 1.8x / 2.5x 2.6x / 4.7x
String 100K 4.9x / 4.0x 3.2x / 3.1x 4.2x / 3.6x 2.3x / 3.2x 2.9x / 4.8x
String 500K 2.3x / 1.9x 2.6x / 2.6x 2.5x / 2.4x 2.2x / 2.3x 3.0x / 3.4x
String 1M 2.5x / 2.2x 2.7x / 2.2x 2.6x / 2.4x 2.2x / 1.8x 2.9x / 3.3x
String 10M 2.7x / 2.3x 2.8x / 2.4x 2.7x / 2.2x 2.7x / 2.4x 3.3x / 5.1x

Memory — Linux

Scenario PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K 0.26x 0.26x 0.26x 0.26x 0.26x
Sparse Int 500K 0.46x 0.46x 0.46x 0.46x 0.46x
Sparse Int 1M 0.46x 0.46x 0.46x 0.46x 0.46x
Sparse Int 10M 0.29x 0.29x 0.29x 0.29x 0.29x
String 100K 0.61x 0.61x 0.61x 0.61x 0.61x
String 500K 0.76x 0.76x 0.76x 0.76x 0.76x
String 1M 0.76x 0.76x 0.76x 0.76x 0.76x
String 10M 0.48x 0.48x 0.48x 0.48x 0.48x

Time (Write / Read) — Windows

Scenario PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K 5.4x / 3.0x 4.6x / 3.2x 4.8x / 2.5x 5.1x / 3.0x 4.9x / 3.2x
Sparse Int 500K 5.1x / 3.5x 4.8x / 3.0x 4.4x / 2.3x 4.7x / 3.1x 4.4x / 2.6x
Sparse Int 1M 4.1x / 3.1x 3.2x / 2.3x 4.3x / 2.6x 3.5x / 2.2x 4.4x / 2.4x
Sparse Int 10M 2.7x / 2.3x 2.5x / 2.4x 3.4x / 2.4x 2.3x / 2.0x 3.0x / 2.2x
String 100K 4.0x / 4.7x 3.1x / 2.6x 4.2x / 4.9x 3.7x / 4.0x 3.3x / 3.4x
String 500K 4.5x / 3.0x 3.6x / 2.5x 4.2x / 2.7x 3.5x / 2.4x 3.6x / 2.4x
String 1M 4.3x / 2.9x 3.4x / 2.2x 4.6x / 3.1x 2.6x / 2.1x 3.5x / 2.0x
String 10M 3.7x / 2.3x 3.5x / 2.5x 4.3x / 2.8x 3.4x / 2.4x 3.6x / 2.4x

Memory — Windows

Scenario PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K 0.23x 0.23x 0.23x 0.23x 0.23x
Sparse Int 500K 0.46x 0.46x 0.46x 0.46x 0.46x
Sparse Int 1M 0.46x 0.46x 0.46x 0.46x 0.46x
Sparse Int 10M 0.29x 0.29x 0.29x 0.29x 0.29x
String 100K 0.51x 0.51x 0.51x 0.51x 0.51x
String 500K 0.76x 0.76x 0.76x 0.76x 0.76x
String 1M 0.76x 0.76x 0.76x 0.76x 0.76x
String 10M 0.48x 0.48x 0.48x 0.48x 0.48x
Raw benchmark data

Write Time — Linux

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 0.0121s 0.0119s 0.0125s 0.0121s 0.0114s
Sparse Int 100K PHP Array 0.0040s 0.0039s 0.0040s 0.0041s 0.0058s
Sparse Int 500K Judy 0.0703s 0.0672s 0.0653s 0.0637s 0.0844s
Sparse Int 500K PHP Array 0.0191s 0.0195s 0.0195s 0.0199s 0.0261s
Sparse Int 1M Judy 0.1754s 0.1798s 0.1736s 0.1636s 0.2936s
Sparse Int 1M PHP Array 0.0473s 0.0448s 0.0461s 0.0502s 0.0782s
Sparse Int 10M Judy 2.7468s 2.9301s 2.9013s 2.8176s 5.0719s
Sparse Int 10M PHP Array 1.3599s 1.3246s 1.5032s 1.5373s 1.9453s
String 100K Judy 0.0295s 0.0224s 0.0254s 0.0210s 0.0335s
String 100K PHP Array 0.0060s 0.0069s 0.0060s 0.0090s 0.0114s
String 500K Judy 0.1667s 0.1614s 0.1627s 0.1581s 0.2352s
String 500K PHP Array 0.0723s 0.0624s 0.0663s 0.0705s 0.0784s
String 1M Judy 0.3645s 0.3814s 0.3829s 0.3578s 0.5758s
String 1M PHP Array 0.1474s 0.1410s 0.1483s 0.1659s 0.1957s
String 10M Judy 5.2541s 5.2832s 5.4089s 5.2890s 9.0122s
String 10M PHP Array 1.9346s 1.8898s 2.0005s 1.9743s 2.7071s

Read Time — Linux

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 0.0095s 0.0096s 0.0094s 0.0095s 0.0092s
Sparse Int 100K PHP Array 0.0035s 0.0036s 0.0036s 0.0035s 0.0033s
Sparse Int 500K Judy 0.0612s 0.0652s 0.0564s 0.0735s 0.1185s
Sparse Int 500K PHP Array 0.0203s 0.0229s 0.0205s 0.0209s 0.0247s
Sparse Int 1M Judy 0.1578s 0.1673s 0.1439s 0.1438s 0.3268s
Sparse Int 1M PHP Array 0.0583s 0.0673s 0.0588s 0.0618s 0.1001s
Sparse Int 10M Judy 3.2300s 3.3516s 3.2736s 3.2708s 5.8833s
Sparse Int 10M PHP Array 1.3253s 1.3264s 1.4206s 1.3312s 1.2611s
String 100K Judy 0.0203s 0.0163s 0.0185s 0.0162s 0.0291s
String 100K PHP Array 0.0051s 0.0053s 0.0051s 0.0051s 0.0060s
String 500K Judy 0.1577s 0.1645s 0.1714s 0.1759s 0.2803s
String 500K PHP Array 0.0819s 0.0638s 0.0711s 0.0762s 0.0831s
String 1M Judy 0.3702s 0.3731s 0.4067s 0.3748s 0.6152s
String 1M PHP Array 0.1659s 0.1660s 0.1677s 0.2035s 0.1845s
String 10M Judy 5.6742s 5.6840s 5.6723s 5.6586s 10.1431s
String 10M PHP Array 2.4558s 2.4123s 2.5527s 2.3787s 1.9966s

Memory — Linux

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 1.84 mb 1.84 mb 1.84 mb 1.84 mb 1.84 mb
Sparse Int 100K PHP Array 7 mb 7 mb 7 mb 7 mb 7 mb
Sparse Int 500K Judy 9.18 mb 9.18 mb 9.18 mb 9.18 mb 9.2 mb
Sparse Int 500K PHP Array 20 mb 20 mb 20 mb 20 mb 20 mb
Sparse Int 1M Judy 18.34 mb 18.36 mb 18.37 mb 18.37 mb 18.36 mb
Sparse Int 1M PHP Array 40 mb 40 mb 40 mb 40 mb 40 mb
Sparse Int 10M Judy 183.52 mb 183.61 mb 183.61 mb 183.49 mb 183.56 mb
Sparse Int 10M PHP Array 640 mb 640 mb 640 mb 640 mb 640 mb
String 100K Judy 3.05 mb 3.05 mb 3.05 mb 3.05 mb 3.05 mb
String 100K PHP Array 5 mb 5 mb 5 mb 5 mb 5 mb
String 500K Judy 15.26 mb 15.26 mb 15.26 mb 15.26 mb 15.26 mb
String 500K PHP Array 20 mb 20 mb 20 mb 20 mb 20 mb
String 1M Judy 30.52 mb 30.52 mb 30.52 mb 30.52 mb 30.52 mb
String 1M PHP Array 40 mb 40 mb 40 mb 40 mb 40 mb
String 10M Judy 305.18 mb 305.18 mb 305.18 mb 305.18 mb 305.18 mb
String 10M PHP Array 640 mb 640 mb 640 mb 640 mb 640 mb

Write Time — Windows

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 0.0290s 0.0296s 0.0303s 0.0293s 0.0290s
Sparse Int 100K PHP Array 0.0054s 0.0065s 0.0063s 0.0058s 0.0059s
Sparse Int 500K Judy 0.1582s 0.1560s 0.1686s 0.1516s 0.1489s
Sparse Int 500K PHP Array 0.0312s 0.0323s 0.0382s 0.0326s 0.0336s
Sparse Int 1M Judy 0.3509s 0.3496s 0.3628s 0.3192s 0.3130s
Sparse Int 1M PHP Array 0.0848s 0.1093s 0.0842s 0.0910s 0.0716s
Sparse Int 10M Judy 5.4822s 5.5045s 5.7186s 4.9012s 4.9675s
Sparse Int 10M PHP Array 2.0516s 2.2249s 1.6588s 2.1059s 1.6415s
String 100K Judy 0.0528s 0.0529s 0.0534s 0.0522s 0.0518s
String 100K PHP Array 0.0133s 0.0170s 0.0127s 0.0140s 0.0157s
String 500K Judy 0.3445s 0.3303s 0.3274s 0.3113s 0.3077s
String 500K PHP Array 0.0768s 0.0906s 0.0788s 0.0888s 0.0848s
String 1M Judy 0.7642s 0.7183s 0.7587s 0.6483s 0.6618s
String 1M PHP Array 0.1760s 0.2136s 0.1648s 0.2458s 0.1885s
String 10M Judy 9.4146s 9.7042s 10.7452s 8.7243s 9.1209s
String 10M PHP Array 2.5630s 2.7358s 2.4895s 2.5672s 2.5314s

Read Time — Windows

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 0.0160s 0.0170s 0.0178s 0.0160s 0.0153s
Sparse Int 100K PHP Array 0.0053s 0.0053s 0.0070s 0.0054s 0.0048s
Sparse Int 500K Judy 0.1158s 0.1236s 0.1130s 0.0980s 0.0903s
Sparse Int 500K PHP Array 0.0334s 0.0411s 0.0495s 0.0320s 0.0347s
Sparse Int 1M Judy 0.2844s 0.2801s 0.2795s 0.2461s 0.2214s
Sparse Int 1M PHP Array 0.0928s 0.1207s 0.1092s 0.1122s 0.0936s
Sparse Int 10M Judy 4.2471s 4.4455s 4.4793s 3.7099s 3.9001s
Sparse Int 10M PHP Array 1.8224s 1.8593s 1.8878s 1.8144s 1.7640s
String 100K Judy 0.0375s 0.0364s 0.0420s 0.0344s 0.0316s
String 100K PHP Array 0.0079s 0.0141s 0.0086s 0.0085s 0.0092s
String 500K Judy 0.2581s 0.2667s 0.2454s 0.2169s 0.2159s
String 500K PHP Array 0.0854s 0.1087s 0.0901s 0.0915s 0.0893s
String 1M Judy 0.6278s 0.5737s 0.5854s 0.5032s 0.4896s
String 1M PHP Array 0.2150s 0.2648s 0.1909s 0.2350s 0.2459s
String 10M Judy 7.2375s 7.8294s 7.8819s 7.2483s 7.1652s
String 10M PHP Array 3.1692s 3.1914s 2.7772s 3.0570s 2.9771s

Memory — Windows

Scenario Subject PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
Sparse Int 100K Judy 1.84 mb 1.84 mb 1.85 mb 1.84 mb 1.85 mb
Sparse Int 100K PHP Array 8 mb 8 mb 8 mb 8 mb 8 mb
Sparse Int 500K Judy 9.18 mb 9.19 mb 9.18 mb 9.19 mb 9.17 mb
Sparse Int 500K PHP Array 20 mb 20 mb 20 mb 20 mb 20 mb
Sparse Int 1M Judy 18.36 mb 18.36 mb 18.34 mb 18.35 mb 18.4 mb
Sparse Int 1M PHP Array 40 mb 40 mb 40 mb 40 mb 40 mb
Sparse Int 10M Judy 183.55 mb 183.59 mb 183.52 mb 183.54 mb 183.64 mb
Sparse Int 10M PHP Array 640 mb 640 mb 640 mb 640 mb 640 mb
String 100K Judy 3.05 mb 3.05 mb 3.05 mb 3.05 mb 3.05 mb
String 100K PHP Array 6 mb 6 mb 6 mb 6 mb 6 mb
String 500K Judy 15.26 mb 15.26 mb 15.26 mb 15.26 mb 15.26 mb
String 500K PHP Array 20 mb 20 mb 20 mb 20 mb 20 mb
String 1M Judy 30.52 mb 30.52 mb 30.52 mb 30.52 mb 30.52 mb
String 1M PHP Array 40 mb 40 mb 40 mb 40 mb 40 mb
String 10M Judy 305.18 mb 305.18 mb 305.18 mb 305.18 mb 305.18 mb
String 10M PHP Array 640 mb 640 mb 640 mb 640 mb 640 mb

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request bumps the version to 2.4.0 in package.xml, php_judy.h, and updates the corresponding test expectations. The release notes in package.xml are also updated to reflect the features and improvements for version 2.4.0. The changes are correct and consistent. While reviewing package.xml, I noticed that many <file> entries are missing the md5sum attribute. Although this is outside the direct changes in this PR, it would be beneficial to add these checksums in a follow-up to ensure package integrity for PECL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant