mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[PR #962] [MERGED] Minor optimization by avoiding fmt.Sprintf on hot path #949
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#949
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hibiken/asynq/pull/962
Author: @pior
Created: 11/10/2024
Status: ✅ Merged
Merged: 11/11/2024
Merged by: @kamikazechaser
Base:
master← Head:str-concat📝 Commits (1)
2d6d6f4Use string concat instead of fmt.Sprintf📊 Changes
2 files changed (+25 additions, -25 deletions)
View changed files
📝
internal/base/base.go(+24 -24)📝
x/rate/semaphore.go(+1 -1)📄 Description
Context
While
fmt.Sprintfis handy, and usually fast enough for most use-cases, we should probably avoid using it for string concatenation on the hot path.Micro-benchmark:
Changes
fmt.Sprintfwith string concatenation when building redis key names/prefixes🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.