-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up "performance allocators" and "performance flate2" backends
Instead of having conditional cargo dependencies in both uv-dev and uv, and different `--features` invocations in CI, this introduces a series of `uv-performance-*` crates that do the right thing. These are enabled by default, but can be disabled when working on correctness alone, locally.
- Loading branch information
1 parent
a541d6c
commit e89f275
Showing
15 changed files
with
189 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "uv-performance-flate2-backend" | ||
version = "0.1.0" | ||
publish = false | ||
|
||
[target.'cfg(not(any(target_arch = "s390x", target_arch = "powerpc64")))'.dependencies] | ||
flate2 = { version = "1.0.28", default-features = false, features = ["zlib-ng"] } | ||
|
||
[target.'cfg(any(target_arch = "s390x", target_arch = "powerpc64"))'.dependencies] | ||
flate2 = { version = "1.0.28", default-features = false, features = ["rust_backend"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//! The sole purpose of this crate is to enable one of | ||
//! `flate2/zlib-ng` (on most platforms) or `flate2/rust_backend` | ||
//! (on s390x, powerpc64, etc. — anywhere libz-ng doesn't build) | ||
//! | ||
//! See `Cargo.toml` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "uv-performance-memory-allocator" | ||
version = "0.1.0" | ||
publish = false | ||
|
||
[dependencies] | ||
|
||
[target.'cfg(all(target_os = "windows"))'.dependencies] | ||
mimalloc = { version = "0.1.43" } | ||
|
||
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] | ||
tikv-jemallocator = { version = "0.6.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! The only purpose of this crate is to pull in `mimalloc` on windows and | ||
//! `tikv-jemallocator` on most other platforms. | ||
#[cfg(target_os = "windows")] | ||
#[global_allocator] | ||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; | ||
|
||
#[cfg(all( | ||
not(target_os = "windows"), | ||
not(target_os = "openbsd"), | ||
any( | ||
target_arch = "x86_64", | ||
target_arch = "aarch64", | ||
target_arch = "powerpc64" | ||
) | ||
))] | ||
#[global_allocator] | ||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; |
Oops, something went wrong.