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

perf: use case-insensitive comparison instead of normalization for command names #410

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

supercaracal
Copy link
Member

@supercaracal supercaracal commented Nov 19, 2024

RedisClient::Cluster::NormalizedCmdName is too slow. String#casecmp would be faster and better. Also, redundant type castings should be removed.

A lowercase command is the best performance in our gem.

@supercaracal supercaracal changed the title perf: use comparison with an insensitive case instead of normalization perf: use case-insensitive comparison instead of normalization Nov 19, 2024
@supercaracal supercaracal changed the title perf: use case-insensitive comparison instead of normalization perf: use case-insensitive comparison instead of normalization for command names Nov 19, 2024
@supercaracal supercaracal marked this pull request as ready for review November 19, 2024 09:41
@supercaracal supercaracal merged commit b293513 into redis-rb:master Nov 19, 2024
33 checks passed
@supercaracal supercaracal deleted the fix-cmd-normalization branch November 19, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant