gpt4 book ai didi

time - Rust中的基准测试程序

转载 作者:行者123 更新时间:2023-12-03 11:48:02 25 4
gpt4 key购买 nike

如何在Rust中对程序进行基准测试?例如,如何获得以秒为单位的程序执行时间?

最佳答案

This answer is outdated! The time crate does not offer any advantages over std::time in regards to benchmarking. Please see the answers below for up to date information.



您可以尝试使用 time crate对程序中的各个组件进行计时。

关于time - Rust中的基准测试程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63237252/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com