Decide on if #[global_allocator]
should remain in evm_arithmetization
#205
Labels
crate: evm_arithmetization
Anything related to the evm_arithmetization crate.
Milestone
Recently due to adding SMT support in #198, we need to link against two versions of
evm_artithmetization
in a single build. This works, except thatevm_artithmetization
defines a global allocator (jemalloc
) with#[global_allocator]
.#[global_allocator]
can only appear once in any given build, so this ends up breaking compilation.It seems that best practices are to avoid using
#[global_allocator]
in libraries and only use it in binaries (since it affects the entire binary, including deps). Currently if there is another binary (or library for that matter) that also defines it's own global allocator, it would not be able to useevm_artithmetization
.My thoughts are we should either do one of the following:
jemalloc
fromevm_artithmetization
and make this the responsibility of the binary to do this.jemalloc
with the presence/absence of a feature flag (this is what Added a feature flag to disablejemalloc
#204 does).Also note that @nbgl mentioned that she is not sure how much performance
jemalloc
is actually giving us at this point and it might be worth revisiting.The text was updated successfully, but these errors were encountered: