XPerf
LanguagesRustEvidence

rs-map-new-hot — measured, hint

Status

hint. Wall-clock JSONL: rs-map-new-hot.jsonl. Not corpus-triaged. The rule was removed after an older 2.07× pair, then put back: two quiet rustc 1.99.1 runs on linux x64 (load 0.03 and 0.11) were 1.533× and 1.510×.

Measurement

20000 inserts of one key. Before HashMap::new each iteration; after clears one map created with with_capacity(1). Both sides read the inserted value.

rolecasemedian_msopsratio
aftermap_reused0.392946200001
beforemap_new_each_iter0.602298200001.533

The second run was 0.374781 ms versus 0.565840 ms (1.510×). Samples on both runs sat in a tight band. Default stays hint. This ratio is not a general speedup.

Unblock

Do not set the default to error from this file alone. A changing key set or a cold path can erase the difference.