- How is release mode different from debug mode?
That depends on your Cargo configuration. By default, there are several compiler flags that have different default values in release versus debug mode. One such flag is the opt-level that gets sent to the llvm code generation—the default debug opt-level is 2, and the default release opt-level is 3. These defaults can be changed in Cargo.toml.
- How long will an empty loop take to run?
Test it out. Otherwise, it is hard to say for sure on every platform. loop will always be an infinite loop. while true should maybe also be an infinite loop, but will generate a warning. for _ in 0..99999999 {} will be removed at opt-level 3 but not opt-level 2.
- What is linear time in Big O notation?
Linear time is O(n) time.
- Name a function that grows faster than exponential growth.
Factorial...