Runtime & concurrency
Reveal answer and reasoning
A measurement describes a selected workload, scope, runtime, configuration, and instrument. Stopwatch ticks use their own frequency, and current-thread allocated bytes count managed allocations in that thread's scope rather than retained heap size or all process memory. Small values can legitimately be zero or vary across runs. They should not be replaced with invented stable durations to make a demonstration look precise.
The lesson keeps deterministic checksum and relationship checks on stdout and actual variable desktop samples on stderr. Its default Debug run demonstrates mechanics, not a serious optimized-code benchmark. A common wrong answer quotes one sample as a universal speed ranking or spans an async thread switch while treating the allocation delta as a total. Correctness needs an independent oracle, and performance needs an appropriate Release experiment, multiple observations, and environment labels before any broader inference is justified.
What a strong answer covers
- Measurement scope and units must be explicit.
- Thread allocation is not retained or total process memory.
- A real benchmark requires correctness and controlled environment.
Common pitfall
Turning one unlabeled timer or allocation observation into a universal performance claim.
Follow-up questions
- Why can zero elapsed ticks be valid?
- What would an await do to a current-thread allocation delta?
Self-review
Choose what to revisit. These marks are your own assessment and are separate from lesson completion.