How can I benchmark rust's stdlib Map with/without 2MiB huge pages?

117 views Asked by At

I'd like to benchmark rust's std::collections::HashMap on a large dataset to see if/how much using Huge Pages (on linux) improves performance. What's the best way to control whether the memory used by the map is backed by huge pages?

Ideally I'd like to be able to control this from within my rust code itself, rather than using a big hammer like turning on Transparent Huge Pages at the OS level. I'm perfectly happy using nightly and/or exotic features/libraries.

0

There are 0 answers