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

Don't serialize/deserialize through json #12

Merged
merged 3 commits into from
Dec 4, 2024
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
233 changes: 232 additions & 1 deletion Cargo.lock

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

14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "polars-tdigest"
version = "0.1.8"
version = "0.1.9"
edition = "2021"

[lib]
name = "polars_tdigest"
crate-type= ["cdylib"]
crate-type= ["rlib"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to change this in order to be able to run benchmarks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think, that it will work by building a plugin:

--crate-type=cdylib, #![crate_type = "cdylib"] - A dynamic system library will be produced. This is used when compiling a dynamic library to be loaded from another language. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
--crate-type=rlib, #![crate_type = "rlib"] - A “Rust library” file will be produced. This is used as an intermediate artifact and can be thought of as a “static Rust library”. These rlib files, unlike staticlib files, are interpreted by the compiler in future linkage. This essentially means that rustc will look for metadata in rlib files like it looks for metadata in dynamic libraries. This form of output is used to produce statically linked executables as well as staticlib outputs.

As we nowhere build again and load and register plugin dynamically from Python interpreter. But we decided to check this practically.



[dependencies]

Expand All @@ -18,6 +19,15 @@ polars-io = { version = "0.40.0", features=["json"] }
pyo3 = { version = "0.21.2", features = ["extension-module", "abi3-py38"] }
pyo3-polars = { version = "0.14.0", features = ["derive"] }

[dev-dependencies]
criterion = "0.5.1"

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


[[bench]]
name = "parser_bench"
harness = false
path = "benches/parser_bench.rs"

Loading
Loading