-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Closed
Copy link
Labels
A-UnicodeArea: UnicodeArea: UnicodeI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Based on #73462
pub fn conv() -> String {
b'a'.to_string()
}
pub fn conv() -> String {
10.to_string()
}
Not sure if we can do much about integer to string but I bet we can do something for byte to string.
test tests::bench_byte_to_string ... bench: 51,257 ns/iter (+/- 1,623)
test tests::bench_char_to_string ... bench: 43,246 ns/iter (+/- 7,624)
test tests::bench_int_to_string ... bench: 52,218 ns/iter (+/- 3,077)
test tests::bench_str_to_string ... bench: 15,701 ns/iter (+/- 380)
(note that char benchmark is not updated with the latest specialization update by @lzutao)
Metadata
Metadata
Assignees
Labels
A-UnicodeArea: UnicodeArea: UnicodeI-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.