Repository navigation
perf(transform): prepare standard library function calls - #1032
Open
timggggggg wants to merge 12 commits into
Open
timggggggg wants to merge 12 commits into
timggggggg wants to merge 12 commits into
Conversation
…thub.com/ozontech/file.d into 1028-transform-prepare-function-calls
This branch has not been deployed
This file contains hidden or 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
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
Prepare all standard library function calls at startup, precomputing argument layouts and defaults to reduce per-event lookups and allocations.
Preserve existing semantics and concurrency safety, with regression tests and benchmarks to validate correctness and performance.
Before #1028
Branch:
1033-expand-transform-benchmark-coverage. Commit:4d1fcc3.assign_new5transformassign_new5modifytrim4transformtrim4modifyrename/preserve/5transformrename/preserve/5renamelogs/no_regex/mixedtransformlogs/no_regex/mixedmodifylogs/regex/mixedtransformlogs/regex/mixedmodifychains/mapping/16/mixedtransformchains/mapping/16/mixedmodify_x16chains/tags/16/mixedtransformchains/tags/16/mixedmodify_x16dynamic/trim_slice/mixedtransformcollections/filter_sum/64transformAfter #1028
Branch:
1028-transform-prepare-function-calls. Commit:9fad910(includes the merged benchmark branch).
assign_new5transformassign_new5modifytrim4transformtrim4modifyrename/preserve/5transformrename/preserve/5renamelogs/no_regex/mixedtransformlogs/no_regex/mixedmodifylogs/regex/mixedtransformlogs/regex/mixedmodifychains/mapping/16/mixedtransformchains/mapping/16/mixedmodify_x16chains/tags/16/mixedtransformchains/tags/16/mixedmodify_x16dynamic/trim_slice/mixedtransformcollections/filter_sum/64transformConclusion
The percentages below compare transform after #1028 with transform before #1028,
using
(after - before) / before * 100.Preparing function calls in #1028 reduced allocation overhead in the function-call workloads. The largest
observed reductions in
ns/opwere in nested trim calls and regex-free log parsing:trim4: -58.7% ns/op, -68.0% B/op, -48.5% allocs/op.logs/no_regex/mixed: -53.5% ns/op, -73.3% B/op, -44.4% allocs/op.chains/mapping/16/mixed: -36.2% ns/op, -51.6% B/op, -26.7% allocs/op.dynamic/trim_slice/mixed: -22.5% ns/op, -18.6% B/op, -33.3% allocs/op.logs/regex/mixed: -5.3% ns/op, -20.6% B/op, -11.4% allocs/op.Fixes #1028