Skip to content

[codex] Update limonp dependency#236

Merged
yanyiwu merged 1 commit into
masterfrom
codex/update-limonp-2026-06-08
Jun 8, 2026
Merged

[codex] Update limonp dependency#236
yanyiwu merged 1 commit into
masterfrom
codex/update-limonp-2026-06-08

Conversation

@yanyiwu

@yanyiwu yanyiwu commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • update the bundled deps/limonp submodule from v1.0.2 (9d74077) to 4065c5f, which includes the LocalVector modernization from Modernize LocalVector helper limonp#44
  • add an explicit <cassert> include in Unicode.hpp

Why

The modernized LocalVector.hpp no longer includes <assert.h> as an implementation detail. Unicode.hpp uses assert directly, so updating the submodule exposed an existing indirect-include dependency and caused the unit-test build to fail. Including <cassert> at the actual use site makes the dependency explicit.

Validation

  • cmake -S . -B /tmp/cppjieba-limonp-build -DCMAKE_BUILD_TYPE=Release
  • cmake --build /tmp/cppjieba-limonp-build --parallel 2
  • ctest --test-dir /tmp/cppjieba-limonp-build --output-on-failure

Result: 2/2 CTest tests passed.

@yanyiwu yanyiwu marked this pull request as ready for review June 8, 2026 03:07
@yanyiwu yanyiwu merged commit 3503cb3 into master Jun 8, 2026
66 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5dddb97d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deps/limonp
@@ -1 +1 @@
Subproject commit 9d74077dfcdf8073536c97a00bb79d7a3c3fdaba
Subproject commit 4065c5f6d5a7a7248aacdd34d738fe0351b97c3f

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid allocating for every DAG entry

With this submodule bump, limonp::LocalVector becomes a std::vector-backed wrapper with default capacity 0. In cppjieba, Trie::Find pushes at least one element into each Dag::nexts for every rune in the input, so the common single-candidate case now performs a heap allocation per character; the previous limonp version kept 16 inline slots and avoided those allocations. For normal Cut calls on long text this can regress the core segmentation hot path, so consider keeping small-vector storage for Dag::nexts or otherwise preallocating/using a different container before taking this update.

Useful? React with 👍 / 👎.

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