Skip to content

More code optimization#119

Merged
matyalatte merged 3 commits intodevfrom
remove_json_result
May 17, 2025
Merged

More code optimization#119
matyalatte merged 3 commits intodevfrom
remove_json_result

Conversation

@matyalatte
Copy link
Owner

Removed unnecessary codes more to reduce binary size.

  • Replaced JsonResult with string.
    (We can replace result.ok with str.empty())
  • Simplified string::empty() and vector::empty().
    (We don't need null check since m_size is zero when m_str is null)
  • Replaced SplitString with SubstrToChar.
    (We don't need to store substrings in a vector.)

we don't need null check since m_size is zero when m_str is null
@matyalatte matyalatte added the optimization Optimization for binary size or performance label May 17, 2025
@matyalatte matyalatte force-pushed the remove_json_result branch from f0e8edb to 2e8abc4 Compare May 17, 2025 06:17
@matyalatte matyalatte merged commit 42920ba into dev May 17, 2025
11 checks passed
@matyalatte matyalatte mentioned this pull request May 17, 2025
@matyalatte matyalatte deleted the remove_json_result branch May 17, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimization Optimization for binary size or performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant