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

Minor optimizations #261

Merged
merged 8 commits into from
Jul 6, 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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v0.14.1

### What's New

- Small performance improvements where checking the size of the chunk is avoided if we already know it is too small or we don't need to.
- Loosen dependency ranges for Rust crates to allow for more flexibility in the versions you can use.

## v0.14.0

### What's New
Expand Down
99 changes: 49 additions & 50 deletions Cargo.lock

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

48 changes: 21 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
members = ["bindings/*"]

[workspace.package]
version = "0.14.0"
version = "0.14.1"
authors = ["Ben Brandt <[email protected]>"]
edition = "2021"
description = "Split text into semantic chunks, up to a desired chunk size. Supports calculating length by characters and tokens, and is callable from Rust and Python."
Expand Down Expand Up @@ -60,38 +60,38 @@ rustdoc-args = ["--cfg", "docsrs"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ahash = "0.8.11"
auto_enums = "0.8.5"
either = "1.13.0"
itertools = "0.13.0"
once_cell = "1.19.0"
pulldown-cmark = { version = "0.11.0", default-features = false, optional = true }
ahash = "0.8.7"
auto_enums = "0.8"
either = "1.6"
itertools = "0.13"
once_cell = "1.18"
pulldown-cmark = { version = "0.11", default-features = false, optional = true }
regex = "1.10.5"
rust_tokenizers = { version = "8.1.1", optional = true }
strum = { version = "0.26.3", features = ["derive"] }
thiserror = "1.0.61"
tiktoken-rs = { version = "0.5.9", optional = true }
tokenizers = { version = "0.19.1", default-features = false, features = [
rust_tokenizers = { version = "8", optional = true }
strum = { version = "0.26", features = ["derive"] }
thiserror = "1.0.49"
tiktoken-rs = { version = "0.5", optional = true }
tokenizers = { version = "0.19", default-features = false, features = [
"onig",
], optional = true }
tree-sitter = { version = "0.22.6", optional = true }
unicode-segmentation = "1.11.0"
tree-sitter = { version = "0.22", optional = true }
unicode-segmentation = "1.11"

[dev-dependencies]
cached-path = { version = "0.6.1", default-features = false, features = [
cached-path = { version = "0.6", default-features = false, features = [
"rustls-tls",
] }
dirs = "5.0.1"
divan = "0.1.14"
fake = "2.9.2"
insta = { version = "1.39.0", features = ["glob", "yaml"] }
more-asserts = "0.3.1"
rayon = "1.10.0"
tokenizers = { version = "0.19.1", default-features = false, features = [
fake = "2"
insta = { version = "1.39", features = ["glob", "yaml"] }
more-asserts = "0.3"
rayon = "1.10"
tokenizers = { version = "0.19", default-features = false, features = [
"onig",
"http",
] }
tree-sitter-rust = "0.21.2"
tree-sitter-rust = "0.21"

[[bench]]
name = "chunk_size"
Expand All @@ -109,10 +109,4 @@ workspace = true

# Tokenizers and indirect deps can cause slow runtime
[profile.dev.package."*"]
opt-level = 1

[profile.dev.package.insta]
opt-level = 3

[profile.dev.package.similar]
opt-level = 3
Loading
Loading