-
Notifications
You must be signed in to change notification settings - Fork 12
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
Perf/misc ds improvements #692
Merged
Merged
Conversation
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
…ingValue a function that allows to create DataStructStringValue
…dexedStringBuilder
…ndexed_sb and sb/ds_string_value
…is in a sub chunk
…aStructValueBuilder
…pile time compliant
The function blank(dataStructureType: DataStructureType) allows to create an instance of DataStructValue that uses the right instance of DataStructValueBuilder based on the provided DataStructureType.
…andle the new DataStructValue constructors
This measure is no longer necessary due to the addition of tests that assert whether DataStructValueBuilder creates an instance of StringBuilderWrapper instead of IndexedStringBuilder
…ful, now it receives both value and DataStructureType All logic of this method has been moved to `JarikoCallback.createDataStructValueBuilder`, this way is totally customizable Add helfpul methods: - DataStructureType.containsOnlyArrays() - DataStructureType.totalFields():
…g is not numeric, must be executed as an exception and not always replace a lot of kotlin deprecated functions
…he string is not numeric, must be executed as an exception and not always" This reverts commit 4b53be0.
…g is not numeric, must be executed as an exception and not always
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Heavy improvements for this kind of DSs:
This was achieved through the implementation of the new
DataStructValueBuilder
interface, responsible for all operations that can change the state of DSs.Currently, the logic for choosing the best implementation of
DataStructValueBuilder
is based on theDataStructureType
and is provided by the new callbackJarikoCallback.createDataStructValueBuilder
.The use case demonstrating the effectiveness of this approach can be viewed here (see the final assert of
executeDSPERF02CompareIndexedStringBuilderVsStringBuilder
function) where we prove that performance improvement can be up to 10 times.During this work, we also noted that the
decodeFromDS
function, which is involved when transforming aString
into aBigDecimal
, performed a lot of logic not always necessary.Before this implementation:
After this implementation:
Related to # (issue)
Checklist:
./gradlew ktlintCheck
)../gradlew check
).docs
directory.