Files
mihomo/component
wwqgtxx 8e2f18a1a9 chore: avoid redundant rank calculations in DomainSet
Child edges are 0 bits and each node ends with a 1 bit in labelBitmap. An edge of nodeId has exactly nodeId preceding 1 bits, so its label index is bmIdx - nodeId. Child nodes follow the same order as labels, starting at 1 because node 0 is the root. Therefore, the child node ID is bmIdx - nodeId + 1.

Use this identity in Has and keys instead of countZeros. Keep rank for wildcard restoration, where the cursor lacks the parent node ID.

Existing short/long query benchmarks take ~12%/~11% less time, with no additional allocations or changes to the index layout.
2026-09-10 09:04:52 +08:00
..
2025-04-09 18:02:13 +08:00
2026-02-08 00:09:46 +08:00
2025-11-10 00:46:09 +08:00
2022-04-25 13:18:30 +08:00
2026-06-28 22:46:16 +08:00
2025-08-11 22:33:01 +08:00