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

Conversation

evgenii-kuznetcov
Copy link
Contributor

@evgenii-kuznetcov evgenii-kuznetcov commented Nov 29, 2024

Benchmark results:
Deserialization of 10 entries * 100 centroids: 188 microsec -> 17 microsec
Deserialization of 20 entries * 300 centroids: 1000 microsec -> 52 microsec

@evgenii-kuznetcov evgenii-kuznetcov changed the title Avoid json middleman Don't serialize/deserialize through json Nov 29, 2024
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.

@liveforeverx liveforeverx merged commit 8effe6b into appian:main Dec 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants