Remove the `stack-alloc` allocator
Preliminary performance testing for libblkio-async has indicated that the stack-alloc
allocator gives only negligible performance benefits, especially when it comes to real-world I/O. On the other hand, it increases the amount of unsafe code, and seems to actually worsen performance in real-world cases.
Do more in-depth I/O checking this (with various node drivers), and if no justification can be found, remove all traces of the allocator in the main code base for simplificaton.
Note: Preliminary testing has also shown that the current model of having “synchronous” Node
and NodeDriverData
functions gives better performance than using async functions (with async_trait
), i.e.:
pub trait NodeDriverData {
fn flush<'a>(...) -> Pin<Box<dyn Future<Output = BlockResult<()>>> + Send + 'a>>;
}
impl Node {
pub fn flush<'a>(...) -> Pin<Box<dyn Future<Output = BlockResult<()>>> + Send + 'a>> {
}
}
instead of:
pub trait NodeDriverData {
async fn flush(...) -> BlockResult<()>;
}
impl Node {
pub async fn flush(...) -> BlockResult<()> {
}
}
So we should probably keep that part at least (instead of making everything openly async).