Half of Rust is unstable. Unfortunately, it's the good half. Fortunately, there are some ways to mitigate that.

For example, Rust's built-in µbenchmarking solution is unstable—locked away behind #![feature(test)] so that it can't get loose and hurt us. What this means is creating benchmarks within your crate will make it impossible for users of the stable compiler to benefit from your work. Luckily for us, that problem only exists if the benchmarks are within your crate.

They don't need to be.

Screen-Shot-2018-02-12-at-10.16.20-AM

This is my workspace right now. I am literally engaged this very minute in adding benchmarks to xvii in preparation for making a small change to the way it all works. (I just want to make sure I don't slow it down a whole lot.) See how the benchmarks are outside the crate proper? Here's what the file itself looks like right now:

#![feature(test)]
extern crate test;

extern crate xvii;

use test::Bencher;

#[bench]
fn convert_to(b: &mut Bencher) {
    unimplemented!()
}

#[bench]
fn format(b: &mut Bencher) {
    unimplemented!()
}

This makes no change whatsoever to the xvii crate itself, and so the consumer doesn't even need to know anything has happened. However, it'll allow me to test and merge that change in how I handle ascii without sweating over whether or not I'm murdering my performance.

happy-dog