-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: improve expr.toString performance (#1706)
Creating a string from the expression can be a common operation when creating messages. This change reduces the overhead by allowing it to be written to an existing builder instance and reduce the amount of internal resizing and copies. **Before** ``` Benchmark Mode Cnt Score Error Units withEscapes thrpt 10 581,213.514 ± 4708.897 ops/s withNoEscapes thrpt 10 643,706.596 ± 9144.301 ops/s ``` **After** ``` Benchmark Mode Cnt Score Error Units withEscapes thrpt 10 956,439.595 ± 5243.582 ops/s withNoEscapes thrpt 10 1,031,542.340 ± 25261.261 ops/s ```
- Loading branch information
1 parent
3df773f
commit 0dea833
Showing
13 changed files
with
403 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.