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

Update to Unicode 16.0.0 #27

Merged
merged 1 commit into from
Sep 11, 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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ different ratios of ASCII to non-ASCII codepoints in the input data.

| | static storage | 0% nonascii | 1% | 10% | 100% nonascii |
|---|---|---|---|---|---|
| **`unicode-ident`** | 10.1 K | 0.96 ns | 0.95 ns | 1.09 ns | 1.55 ns |
| **`unicode-xid`** | 11.5 K | 1.88 ns | 2.14 ns | 3.48 ns | 15.63 ns |
| **`ucd-trie`** | 10.2 K | 1.29 ns | 1.28 ns | 1.36 ns | 2.15 ns |
| **`fst`** | 139 K | 55.1 ns | 54.9 ns | 53.2 ns | 28.5 ns |
| **`unicode-ident`** | 10.4 K | 0.96 ns | 0.95 ns | 1.09 ns | 1.55 ns |
| **`unicode-xid`** | 11.8 K | 1.88 ns | 2.14 ns | 3.48 ns | 15.63 ns |
| **`ucd-trie`** | 10.3 K | 1.29 ns | 1.28 ns | 1.36 ns | 2.15 ns |
| **`fst`** | 144 K | 55.1 ns | 54.9 ns | 53.2 ns | 28.5 ns |
| **`roaring`** | 66.1 K | 2.78 ns | 3.09 ns | 3.37 ns | 4.70 ns |

Source code for the benchmark is provided in the *bench* directory of this repo
Expand Down
2 changes: 1 addition & 1 deletion generate/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// To regenerate tables, run the following in the repo root:
//
// $ cargo install ucd-generate
// $ curl -LO https://www.unicode.org/Public/zipped/15.0.0/UCD.zip
// $ curl -LO https://www.unicode.org/Public/zipped/16.0.0/UCD.zip
// $ unzip UCD.zip -d UCD
// $ ucd-generate property-bool UCD --include XID_Start,XID_Continue > tests/table/tables.rs
// $ ucd-generate property-bool UCD --include XID_Start,XID_Continue --fst-dir tests/fst
Expand Down
2 changes: 1 addition & 1 deletion generate/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::CHUNK;
const HEAD: &str = "\
// \x40generated by ../generate. To regenerate, run the following in the repo root:
//
// $ curl -LO https://www.unicode.org/Public/zipped/15.0.0/UCD.zip
// $ curl -LO https://www.unicode.org/Public/zipped/16.0.0/UCD.zip
// $ unzip UCD.zip -d UCD
// $ cargo run --manifest-path generate/Cargo.toml
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
//!
//! | | static storage | 0% nonascii | 1% | 10% | 100% nonascii |
//! |---|---|---|---|---|---|
//! | **`unicode-ident`** | 10.1 K | 0.96 ns | 0.95 ns | 1.09 ns | 1.55 ns |
//! | **`unicode-xid`** | 11.5 K | 1.88 ns | 2.14 ns | 3.48 ns | 15.63 ns |
//! | **`ucd-trie`** | 10.2 K | 1.29 ns | 1.28 ns | 1.36 ns | 2.15 ns |
//! | **`fst`** | 139 K | 55.1 ns | 54.9 ns | 53.2 ns | 28.5 ns |
//! | **`unicode-ident`** | 10.4 K | 0.96 ns | 0.95 ns | 1.09 ns | 1.55 ns |
//! | **`unicode-xid`** | 11.8 K | 1.88 ns | 2.14 ns | 3.48 ns | 15.63 ns |
//! | **`ucd-trie`** | 10.3 K | 1.29 ns | 1.28 ns | 1.36 ns | 2.15 ns |
//! | **`fst`** | 144 K | 55.1 ns | 54.9 ns | 53.2 ns | 28.5 ns |
//! | **`roaring`** | 66.1 K | 2.78 ns | 3.09 ns | 3.37 ns | 4.70 ns |
//!
//! Source code for the benchmark is provided in the *bench* directory of this
Expand Down
178 changes: 99 additions & 79 deletions src/tables.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn compare_all_implementations() {
let thought_to_be_continue = unicode_ident::is_xid_continue(ch);

// unicode-xid
// FIXME: unicode-xid does not support Unicode 15.1.0 yet.
// FIXME: unicode-xid does not support Unicode 16.0.0 yet.
/*
assert_eq!(
thought_to_be_start,
Expand Down
Binary file modified tests/fst/xid_continue.fst
Binary file not shown.
Binary file modified tests/fst/xid_start.fst
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/static_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn test_size() {
+ size_of_val(&tables::TRIE_START)
+ size_of_val(&tables::TRIE_CONTINUE)
+ size_of_val(&tables::LEAF);
assert_eq!(10080, size);
assert_eq!(10400, size);
}

#[test]
Expand All @@ -23,7 +23,7 @@ fn test_xid_size() {
mod tables;

let size = size_of_val(tables::XID_START) + size_of_val(tables::XID_CONTINUE);
assert_eq!(11544, size);
assert_eq!(11872, size);

let _ = tables::BY_NAME;
}
Expand Down Expand Up @@ -70,7 +70,7 @@ fn test_trieset_size() {
+ size_of_val(tree3_level2)
+ size_of_val(tree3_level3);

assert_eq!(10200, start_size + continue_size);
assert_eq!(10344, start_size + continue_size);

let _ = trie::BY_NAME;
}
Expand All @@ -80,7 +80,7 @@ fn test_fst_size() {
let xid_start_fst = include_bytes!("fst/xid_start.fst");
let xid_continue_fst = include_bytes!("fst/xid_continue.fst");
let size = xid_start_fst.len() + xid_continue_fst.len();
assert_eq!(138736, size);
assert_eq!(144140, size);
}

#[test]
Expand Down
242 changes: 126 additions & 116 deletions tests/tables/tables.rs

Large diffs are not rendered by default.

247 changes: 127 additions & 120 deletions tests/trie/trie.rs

Large diffs are not rendered by default.

Loading