message: MAINT: Add microbenches for stable graph's retain_nodes/edges
diff: @@ -190,3 +190,17 @@ fn graph_map(bench: &mut Bencher)
  let a = parse_graph::<Directed>(BIGGER);
  bench.iter(|| a.map(|i, _| i, |i, _| i));
  }
  +
  +#[bench]
  +fn stable_graph_retain_nodes(bench: &mut Bencher)
  +{
  + let mut a = parse_stable_graph::<Directed>(BIGGER);
  + bench.iter(|| a.retain_nodes(|gr, i| (i.index() + 1) % 3700 != 0));
  +}
  +
  +#[bench]
  +fn stable_graph_retain_edges(bench: &mut Bencher)
  +{
  + let mut a = parse_stable_graph::<Directed>(BIGGER);
  + bench.iter(|| a.retain_edges(|gr, i| (i.index() + 1) % 3700 != 0));
  +}
  