Skip to content

string performance optimisation#102

Open
sergeevik wants to merge 1 commit intodashjoin:mainfrom
sergeevik:performance-string
Open

string performance optimisation#102
sergeevik wants to merge 1 commit intodashjoin:mainfrom
sergeevik:performance-string

Conversation

@sergeevik
Copy link
Contributor

@sergeevik sergeevik commented Mar 24, 2026

string and regex optimisation

For string:

  • create string by ""+char created new every time. If use String.valueOf some string get from java cache (memmory optimisation)
  • replace string concationation in cycle on stringbuilder

For regex:

  • pattern compile one time and then use multiple times instead compile every time

JsonParser.java
replace readEscape logic with hex data (remove create string and parse it)

@sergeevik sergeevik force-pushed the performance-string branch 2 times, most recently from 9fb13e2 to 267a13d Compare March 24, 2026 23:12
@sergeevik sergeevik force-pushed the performance-string branch from 267a13d to f5a2474 Compare March 24, 2026 23:18
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