Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak to Save Memory Consumption When Compiling Dictionaries #661

Merged
merged 5 commits into from
Jun 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(vocabulary.h): align the size of DictEntry struct
This may reduce about 1% peak memory usage when compiling dict.
  • Loading branch information
WhiredPlanck committed Jun 10, 2023
commit 06bcb8c2e09f21448db767180d58098e15574641
4 changes: 2 additions & 2 deletions src/rime/dict/vocabulary.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ struct DictEntry {
string text;
string comment;
string preedit;
double weight = 0.0;
int commit_count = 0;
Code code; // multi-syllable code from prism
string custom_code; // user defined code
double weight = 0.0;
int commit_count = 0;
int remaining_code_length = 0;

DictEntry() = default;
Expand Down