It turns out that string formatting is quite expensive as part of mapping
operations (surprise!) and we were doing some unnecessary calls to construct
error messages that are never used. So, instead of using cause(), switch
to using with_cause() so that we can delay the calls to format!() to when
they are strictly needed.
Should cut about 15% of the CPU time spent within map operations per the
measurements done by @beasleyr-vmw.
It turns out that string formatting is quite expensive as part of mapping operations (surprise!) and we were doing some unnecessary calls to construct error messages that are never used. So, instead of using cause(), switch to using with_cause() so that we can delay the calls to format!() to when they are strictly needed.
Should cut about 15% of the CPU time spent within map operations per the measurements done by @beasleyr-vmw.
Fixes #111.