-
concatenation_benchmarks-rs
📈 benchmarking different ways to concatenate strings in rust (by rimutaka)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
The widely quoted string concatenation benchmarks by Hendrik Sollich are 4 years old. I added a few methods and some macros from crates.io and re-ran the benches. Here are the results: 0 ns/iter (+/- 0) from_bytes 10 ns/iter (+/- 0) concat_string_macro 10 ns/iter (+/- 0) concat_strs_macro 10 ns/iter (+/- 0) mut_string_with_capacity_push_str_char 10 ns/iter (+/- 0) string_concat_macro 10 ns/iter (+/- 1) mut_string_with_capacity_push_str 14 ns/iter (+/- 0) concat_in_place_macro 19 ns/iter (+/- 10) mut_string_with_too_much_capacity_push_str 22 ns/iter (+/- 0) array_join 24 ns/iter (+/- 0) array_concat 24 ns/iter (+/- 0) array_join_long 24 ns/iter (+/- 0) mut_string_push_str 27 ns/iter (+/- 0) string_from_plus_op 27 ns/iter (+/- 0) to_string_plus_op 29 ns/iter (+/- 0) to_owned_plus_op 30 ns/iter (+/- 0) collect_from_array_to_string 34 ns/iter (+/- 0) collect_from_vec_to_string 39 ns/iter (+/- 0) mut_string_with_too_little_capacity_push_str 43 ns/iter (+/- 1) string_from_all 52 ns/iter (+/- 0) format_macro 53 ns/iter (+/- 0) format_macro_implicit_args 68 ns/iter (+/- 1) mut_string_push_string
Sorry, that's just me being lazy. I updated the ReadMe https://github.com/rimutaka/concatenation_benchmarks-rs/commit/218f1be779c9a86a3d1c3588601449fc2c008f06. Thanks for pointing it out!
Related posts
-
Why Choose ULIDs over Traditional UUIDs or IDs for Database Identification?
-
Show HN: Rustubble – Beautifull CLI components for your terminal
-
Alert for Social Engineering Takeovers of Open Source Projects
-
What is a low/reasonable cost solution for service log storage and querying?
-
Verified Rust for low-level systems code