Skip to content

Simplify global states#137

Closed
tisonkun wants to merge 1 commit intomessense:mainfrom
tisonkun:globals
Closed

Simplify global states#137
tisonkun wants to merge 1 commit intomessense:mainfrom
tisonkun:globals

Conversation

@tisonkun
Copy link
Contributor

Signed-off-by: tison <wander4096@gmail.com>
pub mod tfidf;

pub static DEFAULT_STOP_WORDS: LazyLock<BTreeSet<String>> = LazyLock::new(|| {
pub fn default_stop_words() -> BTreeSet<String> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems we always use clone. Then we may probably not expose it as a static state.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 98.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.07%. Comparing base (73f6eb7) to head (48779c2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
jieba/src/lib.rs 98.24% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
- Coverage   83.34%   83.07%   -0.27%     
==========================================
  Files           9        9              
  Lines        1759     1767       +8     
==========================================
+ Hits         1466     1468       +2     
- Misses        293      299       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 19, 2025

CodSpeed Performance Report

Merging #137 will not alter performance

Comparing tisonkun:globals (48779c2) with main (03fc34d)

Summary

✅ 12 untouched

@messense
Copy link
Owner

Just to confirm, the regex change will not regress #122?

@tisonkun
Copy link
Contributor Author

Now I get the reason we use thread-locals here. Let me bench it out.

@tisonkun tisonkun marked this pull request as draft December 19, 2025 16:25
@tisonkun
Copy link
Contributor Author

No. It is still relevant.

Closed.

@tisonkun tisonkun closed this Dec 19, 2025
@tisonkun tisonkun deleted the globals branch December 19, 2025 16:45
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.

2 participants