Skip to content

Commit bc88290

Browse files
committed
perf: move to interned string and construct the graph with usize
1 parent dd08296 commit bc88290

File tree

4 files changed

+182
-136
lines changed

4 files changed

+182
-136
lines changed

Cargo.lock

Lines changed: 17 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coreutils (uutils)
22
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
33

4-
# spell-checker:ignore (libs) bigdecimal datetime serde bincode gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs
4+
# spell-checker:ignore (libs) bigdecimal datetime serde bincode gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs interner
55

66
[package]
77
name = "coreutils"
@@ -403,7 +403,7 @@ uucore_procs = { version = "0.5.0", package = "uucore_procs", path = "src/uucore
403403
uu_ls = { version = "0.5.0", path = "src/uu/ls" }
404404
uu_base32 = { version = "0.5.0", path = "src/uu/base32" }
405405
uutests = { version = "0.5.0", package = "uutests", path = "tests/uutests" }
406-
406+
string-interner = "0.19.0"
407407
[dependencies]
408408
clap.workspace = true
409409
clap_complete = { workspace = true, optional = true }
@@ -414,7 +414,7 @@ selinux = { workspace = true, optional = true }
414414
textwrap.workspace = true
415415
uucore.workspace = true
416416
zip = { workspace = true, optional = true }
417-
417+
string-interner.workspace = true
418418

419419
# * uutils
420420
uu_test = { optional = true, version = "0.5.0", package = "uu_test", path = "src/uu/test" }
@@ -521,6 +521,7 @@ who = { optional = true, version = "0.5.0", package = "uu_who", path = "src/uu/w
521521
whoami = { optional = true, version = "0.5.0", package = "uu_whoami", path = "src/uu/whoami" }
522522
yes = { optional = true, version = "0.5.0", package = "uu_yes", path = "src/uu/yes" }
523523

524+
524525
# this breaks clippy linting with: "tests/by-util/test_factor_benches.rs: No such file or directory (os error 2)"
525526
# factor_benches = { optional = true, version = "0.0.0", package = "uu_factor_benches", path = "tests/benches/factor" }
526527

src/uu/tsort/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#spell-checker:ignore (libs) interner
12
[package]
23
name = "uu_tsort"
34
description = "tsort ~ (uutils) topologically sort input (partially ordered) pairs"
@@ -22,7 +23,7 @@ clap = { workspace = true }
2223
thiserror = { workspace = true }
2324
uucore = { workspace = true }
2425
fluent = { workspace = true }
25-
26+
string-interner = { workspace = true }
2627
[[bin]]
2728
name = "tsort"
2829
path = "src/main.rs"

0 commit comments

Comments
 (0)