Commit ac25155
Use ICU4X built-in data (#482)
The data that is currently being generated in `parley_data` is the same
data that ICU4X ships with. However, using `try_new_unstable`
constructors with custom data providers can be less efficient than
enabling the `compiled_data` feature, as these constructors do runtime
lookups and branching, whereas most `compiled_data` constructors are
`const`.
Benchmarks look neutral:
```
Default Style - arabic 20 characters [ 9.9 us ... 9.7 us ] -1.46%*
Default Style - latin 20 characters [ 4.5 us ... 4.3 us ] -4.27%*
Default Style - japanese 20 characters [ 9.1 us ... 8.9 us ] -2.30%*
Default Style - arabic 1 paragraph [ 55.5 us ... 55.6 us ] +0.13%
Default Style - latin 1 paragraph [ 18.2 us ... 17.9 us ] -1.49%*
Default Style - japanese 1 paragraph [ 76.8 us ... 76.9 us ] +0.16%
Default Style - arabic 4 paragraph [ 234.0 us ... 235.1 us ] +0.48%
Default Style - latin 4 paragraph [ 69.0 us ... 68.2 us ] -1.05%*
Default Style - japanese 4 paragraph [ 131.9 us ... 136.0 us ] +3.11%
Styled - arabic 20 characters [ 11.3 us ... 11.3 us ] -0.43%
Styled - latin 20 characters [ 6.3 us ... 6.3 us ] -0.99%
Styled - japanese 20 characters [ 9.9 us ... 9.7 us ] -1.80%*
Styled - arabic 1 paragraph [ 59.4 us ... 58.5 us ] -1.40%
Styled - latin 1 paragraph [ 23.7 us ... 23.3 us ] -1.82%*
Styled - japanese 1 paragraph [ 86.6 us ... 87.5 us ] +1.05%*
Styled - arabic 4 paragraph [ 251.7 us ... 252.5 us ] +0.32%
Styled - latin 4 paragraph [ 90.4 us ... 89.1 us ] -1.45%*
Styled - japanese 4 paragraph [ 123.7 us ... 124.0 us ] +0.24%
```
---------
Co-authored-by: Taj Pereira <taj@canva.com>1 parent 4f25d22 commit ac25155
File tree
25 files changed
+110
-1814
lines changed- parley_data_gen
- src
- parley_data
- src
- generated
- composite
- icu4x_data
- parley
- src/analysis
25 files changed
+110
-1814
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
51 | 46 | | |
52 | 47 | | |
53 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 25 | + | |
47 | 26 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 27 | + | |
71 | 28 | | |
72 | 29 | | |
73 | 30 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 31 | + | |
88 | 32 | | |
89 | 33 | | |
90 | 34 | | |
91 | | - | |
92 | | - | |
| 35 | + | |
| 36 | + | |
93 | 37 | | |
94 | 38 | | |
95 | 39 | | |
96 | 40 | | |
97 | | - | |
| 41 | + | |
98 | 42 | | |
99 | 43 | | |
100 | 44 | | |
101 | | - | |
102 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
103 | 74 | | |
104 | 75 | | |
105 | 76 | | |
106 | 77 | | |
107 | | - | |
| 78 | + | |
108 | 79 | | |
109 | 80 | | |
110 | 81 | | |
111 | 82 | | |
112 | | - | |
| 83 | + | |
113 | 84 | | |
114 | 85 | | |
115 | 86 | | |
116 | | - | |
117 | | - | |
| 87 | + | |
| 88 | + | |
118 | 89 | | |
119 | 90 | | |
120 | 91 | | |
121 | | - | |
122 | | - | |
| 92 | + | |
| 93 | + | |
123 | 94 | | |
124 | 95 | | |
125 | 96 | | |
| |||
354 | 325 | | |
355 | 326 | | |
356 | 327 | | |
357 | | - | |
358 | | - | |
| 328 | + | |
359 | 329 | | |
360 | 330 | | |
361 | 331 | | |
| |||
378 | 348 | | |
379 | 349 | | |
380 | 350 | | |
381 | | - | |
382 | | - | |
| 351 | + | |
383 | 352 | | |
384 | 353 | | |
385 | 354 | | |
| |||
455 | 424 | | |
456 | 425 | | |
457 | 426 | | |
458 | | - | |
| 427 | + | |
459 | 428 | | |
460 | 429 | | |
461 | 430 | | |
| |||
466 | 435 | | |
467 | 436 | | |
468 | 437 | | |
469 | | - | |
| 438 | + | |
470 | 439 | | |
471 | 440 | | |
472 | 441 | | |
| |||
496 | 465 | | |
497 | 466 | | |
498 | 467 | | |
499 | | - | |
| 468 | + | |
500 | 469 | | |
501 | 470 | | |
502 | 471 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
29 | | - | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
This file was deleted.
0 commit comments