Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from unmaintained jemalloctor to maintained tikv-jemallocator. #3141

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@
//!
//! ### Custom allocator
//! A DataFrame library naturally does a lot of heap allocations. It is recommended to use a custom
//! allocator. [Mimalloc](https://docs.rs/mimalloc/0.1.25/mimalloc/) and [JeMalloc](https://crates.io/crates/jemallocator) for instance, show a significant
//! allocator.
//! [Mimalloc](https://crates.io/crates/mimalloc) and
//! [JeMalloc](https://crates.io/crates/tikv-jemallocator) for instance, show a significant
//! performance gain in runtime as well as memory usage.
//!
//! #### Usage
Expand Down
44 changes: 22 additions & 22 deletions py-polars/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion py-polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ description = "Blazingly fast DataFrame library"
mimalloc = { version = "*", default-features = false }

[target.'cfg(target_os="linux")'.dependencies]
jemallocator = { version = "0.3", features = ["disable_initial_exec_tls"] }
tikv-jemallocator = { version = "0.4", features = ["disable_initial_exec_tls"] }

[dependencies]
ahash = "0.7"
Expand Down
4 changes: 2 additions & 2 deletions py-polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ use crate::error::{
use crate::file::get_either_file;
use crate::prelude::{ClosedWindow, DataType, DatetimeArgs, Duration, DurationArgs, PyDataType};
use dsl::ToExprs;
#[cfg(target_os = "linux")]
use jemallocator::Jemalloc;
#[cfg(not(target_os = "linux"))]
use mimalloc::MiMalloc;
use polars::functions::{diag_concat_df, hor_concat_df};
Expand All @@ -49,6 +47,8 @@ use polars_core::datatypes::TimeUnit;
use polars_core::export::arrow::io::ipc::read::read_file_metadata;
use polars_core::prelude::IntoSeries;
use pyo3::types::{PyBool, PyDict, PyFloat, PyInt, PyString};
#[cfg(target_os = "linux")]
use tikv_jemallocator::Jemalloc;

#[global_allocator]
#[cfg(target_os = "linux")]
Expand Down