Skip to content

optimize Unicode tables #24560

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

Merged
merged 1 commit into from
Apr 18, 2015
Merged

optimize Unicode tables #24560

merged 1 commit into from
Apr 18, 2015

Conversation

kwantam
Copy link
Contributor

@kwantam kwantam commented Apr 18, 2015

Apply optimization described in
rust-lang/regex#73 (comment)
to rust's copy of unicode.py.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes load_properties() more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)

Apply optimization described in
rust-lang/regex#73 (comment)
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
@rust-highfive
Copy link
Contributor

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@kwantam
Copy link
Contributor Author

kwantam commented Apr 18, 2015

r? @alexcrichton

Bringing this in from libregex. It's pretty minor, but it does save a bit in the tables.

@rust-highfive rust-highfive assigned alexcrichton and unassigned nrc Apr 18, 2015
@alexcrichton
Copy link
Member

@bors: r+ f14d289

Nice!

bors added a commit that referenced this pull request Apr 18, 2015
Apply optimization described in
rust-lang/regex#73 (comment)
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
@bors
Copy link
Collaborator

bors commented Apr 18, 2015

⌛ Testing commit f14d289 with merge a166400...

@bors
Copy link
Collaborator

bors commented Apr 18, 2015

@bors bors merged commit f14d289 into rust-lang:master Apr 18, 2015
@kwantam kwantam deleted the apply_table_opt branch April 18, 2015 23:44
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.

5 participants