Skip to content
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

test/fuzz: speedup string serialization #10131

Merged

Conversation

ligurio
Copy link
Member

@ligurio ligurio commented Jun 13, 2024

  • clamp before cleaning string because cleaning is not cheap (O(n), where max n is equal to kMaxStrLength)
  • call cleaning for identifiers only, there is no sense to cleaning string literals
  • replace symbols disallowed by Lua grammar in indentifier's names with '_'

The patch saves 16 sec on 145k samples (401 sec before the patch and 385 sec after the patch). It is actually not so much, but it is about 2.5 min per hour.

NO_CHANGELOG=testing
NO_DOC=testing

- clamp before cleaning string because cleaning is not cheap
  (O(n), where max n is equal to kMaxStrLength)
- call cleaning for identifiers only, there is no sense to
  cleaning string literals
- replace symbols disallowed by Lua grammar in indentifier's
  names with '_'

The patch saves 16 sec on 145k samples (401 sec before the patch
and 385 sec after the patch). It is actually not so much, but it
is about 2.5 min per hour.

NO_CHANGELOG=testing
NO_DOC=testing
@ligurio ligurio requested a review from Buristan June 13, 2024 18:33
@coveralls
Copy link

Coverage Status

coverage: 87.097% (+0.01%) from 87.084%
when pulling fffd829 on ligurio:ligurio/gh-xxxx-speedup-serializer
into c06d0d1
on tarantool:master
.

@Buristan Buristan self-assigned this Jun 17, 2024
@Buristan Buristan added the full-ci Enables all tests for a pull request label Jun 17, 2024
Copy link
Collaborator

@Buristan Buristan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Sergey!
Thanks for the patch!
LGTM!

@Buristan Buristan merged commit 3d97334 into tarantool:master Jun 17, 2024
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Enables all tests for a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants