【Rust日报】2022-02-24 字符串连接操作的基准测试

字符串连接操作的基准测试

基于 Hendrik Sollich 在 4 年前的工作,作者添加了一些常用的函数和宏的基准结果:

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

GitHub - hoodie/concatenation_benchmarks-rs: https://github.com/hoodie/concatenation_benchmarks-rs

String concatenations benchmarks (updated): https://www.reddit.com/r/rust/comments/t06hk7/string_concatenations_benchmarks_updated/

热议 - 2022 年你会选择哪种 Web 框架

Sylvain Kerkour ,Bloom 的创建者也是 Black Hat Rust 一书的作者,发文对比了 actix-web、warp 和 axum 三个 Web 框架,结合代码示例进行了一个简单的评估。尽管作者心属 axum,但还是选择 actix-web 作为 Bloom 的首选。

Reddit 上的网友则提供了更多讨论,包括 tide ,rocket 以及 poem 。

Which Rust web framework to choose in 2022 (with code examples): https://www.reddit.com/r/rust/comments/szl0im/which_rust_web_framework_to_choose_in_2022_with/

This Week in Rust 431

新一期的 Rust 周报速递发布,快来看看有哪些内容你曾经关注过 :)

This Week in Rust 431: https://this-week-in-rust.org/blog/2022/02/23/this-week-in-rust-431/


From 日报小组 PsiACE

社区学习交流平台订阅:

  • Rust.cc 论坛: 支持 rss

  • 微信公众号:Rust 语言中文社区

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值