Skip to content

Conversation

@franz1981
Copy link
Contributor

@radcortez this is still a draft, but it:

  • avoid allocating at all any StringBuilder if not necessary (usually it happens)
  • it avoid advancing the StringBuilder 's length for each appended ascii/numeric char (including performing bound checks over and over), but try hard performing an optimized batch append

I have to write a JMH bench to verify if it is much better (as I expect, given that while still C1 compiled, usually, having less work overall deliver better performance) or instead is better to split the state machine into different loops (not on this PR yet).

I'll provide a JMH benchmark to show if it brings the benefits I expect

@franz1981
Copy link
Contributor Author

As usual, humans sucks at estimation :P
JMH reveal something interesting, when the code is interpreted; will update soon this draft

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