First pass at optimizing splitOnWordBoundaries which was refactored in #975. Avoids re-computation of "is start of word" when we already know it isn't the start of a word.
Timings before and after for camel casing everything in all-names-test-output.csv:
// BEFORE
took 2634 milliseconds
took 1990 milliseconds
took 2211 milliseconds
took 1822 milliseconds
took 2038 milliseconds
// AFTER
took 487 milliseconds
took 392 milliseconds
took 353 milliseconds
took 352 milliseconds
took 346 milliseconds
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue \
n/a
Description of changes
First pass at optimizing
splitOnWordBoundaries
which was refactored in #975. Avoids re-computation of "is start of word" when we already know it isn't the start of a word.Follows after the similar Rust PR: https://github.com/smithy-lang/smithy-rs/pull/3140
Timings before and after for camel casing everything in
all-names-test-output.csv
:By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.