| Crates.io | fast-concat |
| lib.rs | fast-concat |
| version | 1.0.2 |
| created_at | 2024-12-10 15:59:51.556912+00 |
| updated_at | 2025-02-16 12:53:58.890333+00 |
| description | Fastest macro for concatenating strings. |
| homepage | |
| repository | https://github.com/tigerros/fast-concat |
| max_upload_size | |
| id | 1478674 |
| size | 23,736 |
The fastest, constant able (thanks to constcat), no-std compatible way to concatenate &strs.
Due to how macros work, you need to import constcat as a separate dependency.
This is as fast or faster than the fastest string concatenating crates (I checked those in hoodie/concatenation_benchmarks-rs).
Those have other problems too:
concat_string_macro evaluates expressions twice and requires std.concat_strs_macro doesn't work for certain expressions.string_concat_macro is the best, but it doesn't have the last two of the optimizations below.
As a nitpick, it also requires that you use string_concat::string_concat_impl.
I know, I know. Grasping at straws, but I wanted to go over all the differences.concat!] macro, and a literal will be returned.