HiveBrain v1.2.0
Get Started
← Back to all entries
snippetrustModerate

How to benchmark programs in Rust?

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
benchmarkprogramshowrust

Problem

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

Solution

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.

Context

Stack Overflow Q#13322479, score: 20

Revisions (0)

No revisions yet.