Implement the native async fn
in trait to replace our dependency of the crate async trait
#48
Labels
async fn
in trait to replace our dependency of the crate async trait
#48
Refactor
When Rust 1.75 will be released, a new major change that will impact our codebase will be out
async fn
in trait.This is a long awaited feature in the Rust ecosystem, since it was only possible to use
async trait
with the nightly version of the compiler using thecfg features
that will allow their usage.Since
Canyon-SQL
codebase is mandatorystable flavour
based, we need to use theasync trait
crate, which provides a workaround to be able to use async functions in traits. This workaround is based on macros that ultimately will use dynamic dispatch along with fat pointers to sugar the concept that we're discussing. That means that we are losing performance (since the code relies on runtime functionality) and also we're losing perfomance because the usage of dynamic dispatch.This will improve cache locality (less cache misses in consecuence) and will help us to avoid false sharing.
This change improves the performance of the heart of
Canyon
and now that the async API will be stabilized for this concrete feature in the release version mentioned above, it's time to refactor this part to include native async support when the version will be out.The text was updated successfully, but these errors were encountered: