Closed
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)