Benchmarking programs in Rust

前端 未结 8 1190
礼貌的吻别
礼貌的吻别 2020-12-07 23:50

How is it possible to benchmark programs in Rust? For example, how would I get execution time of program in seconds?

8条回答
  •  情深已故
    2020-12-08 00:50

    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.


    You might try timing individual components within the program using the time crate.

提交回复
热议问题