Files
thefoldwithin-earth/.old2/target/release/deps/libunicode_ident-d90ab847601a2565.rmeta
T

38 lines
34 KiB
Plaintext
Raw Normal View History

2025-10-19 16:48:12 -05:00
rust
Û„#rustc 1.90.0 (1159e78c4 2025-09-14)Á˜[9íùBëÔØî'Ì-049beac0cc29bd50ÁÒŸãPñqµöu}ð(ÚòÑË-8e6617d0a0e102d3Á˜ is_xid_startÁis_xid_continueÁtablesÁ   Align8Á
ò Align64Á
ò  ASCII_STARTÁ  ASCII_CONTINUEÁ  CHUNKÁ 
TRIE_STARTÁ  
TRIE_CONTINUEÁ  LEAFÁ 
‰
"trueÁ,ˆ
´ø$"falseÁÁ
)ã4;128Á
ã)ã4;128Áà

@ãüÀ
#ã
$64Á 
ã)ã4;411Á
ã)ã4;1793Á$âw
 ã!)ã4;7968ÁÜ¥ 'ûò ëÉ.4ÖÚÅ _Å fm{ Å å ¨Å ¯äæ Å $šò ›ÝLÄ@„ªnÅ \Å cjx Å Žš¦ ¥Å ¬³
˜Ðt¸\º\È\é,Õ\ ¢$Ü\ Šlâ\õTñ\ ü±cü¦£ [![github]](https://github.com/dtolnay/unicode-ident)&ensp;[![crates-io]](https://crates.io/crates/unicode-ident)&ensp;[![docs-rs]](https://docs.rs/unicode-ident)Á§©ü«jg [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=githubÁü–nk [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rustÁü…mj [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rsÁó© <br>Á©ü„NK Implementation of [Unicode Standard Annex #31][tr31] for determining whichÁüÓ@= `char` values are valid in programming language identifiers.Á©ü˜1. [tr31]: https://www.unicode.org/reports/tr31/ÁÊ©üÎNK This crate is a better optimized implementation of the older `unicode-xid`ÁüLI crate. This crate uses less static storage, and is able to classify bothÁüêLI ASCII and non-ASCII codepoints with better performance, 2&ndash;6&times;Áô· faster than `unicode-xid`.ÁÖ©ûã©üç  ## Comparison of performanceÁˆ©üŒJG The following table shows a comparison between five Unicode identifierÁ¤× implementations.Áì©üð$! - `unicode-ident` is this crate;Áü• IF - [`unicode-xid`] is a widely used crate run by the "unicode-rs" org;Áüß C@ - `ucd-trie` and `fst` are two data structures supported by theÁä£
 [`ucd-generate`] tool;ÁüÀ
=: - [`roaring`] is a Rust implementation of Roaring bitmap.Áþ
©ü‚ PM The *static storage* column shows the total size of `static` tables that theÁüÓ =: crate bakes into your binary, measured in 1000s of bytes.Á ©ü• JG The remaining columns show the **cost per call** to evaluate whether aÁüà GD single `char` has the XID\_Start or XID\_Continue Unicode property,Áü¨
MJ comparing across different ratios of ASCII to non-ASCII codepoints in theÁ
 input data.Á©üŠ>; [`unicode-xid`]: https://github.com/unicode-rs/unicode-xidÁüÉ@= [`ucd-generate`]: https://github.com/BurntSushi/ucd-generateÁüŠ<9 [`roaring`]: https://github.com/RoaringBitmap/roaring-rsÁÇ©üËA> | | static storage | 0% nonascii | 1% | 10% | 100% nonascii |Áì |---|---|---|---|---|---|Áü«LI | **`unicode-ident`** | 10.5 K | 1.03 ns | 1.02 ns | 1.11 ns | 1.66 ns |ÁüøJG | **`unicode-xid`** | 12.0 K | 2.57 ns | 2.74 ns | 3.20 ns | 9.35 ns |ÁüÃGD | **`ucd-trie`** | 10.4 K | 1.27 ns | 1.27 ns | 1.41 ns | 2.53 ns |Áü‹A> | **`fst`** | 144 K | 49.3 ns | 49.1 ns | 47.1 ns | 27.9 ns |ÁüÍFC | **`roaring`** | 66.1 K | 4.10 ns | 4.05 ns | 4.02 ns | 5.12 ns |Á©ü˜NK Source code for the benchmark is provided in the *bench* directory of thisÁüç:7 repo and may be repeated by running `cargo criterion`.Á¢©û¯©ü³$! ## Comparison of data structuresÁØ©¤Ü #### unicode-xidÁñ©üõOL They use a sorted array of character ranges, and do a binary search to lookÁüÅB? up whether a given character lands inside one of those ranges.Áˆ© ```rustÁü˜" # const _: &str = stringify! {Áü»63 static XID_Continue_table: [(char, char); 763] = [Áüò%" ('\u{30}', '\u{39}'), // 0-9Áü˜%" ('\u{41}', '\u{5a}'), // A-ZÁ # "Á …Á(üÚ# ('\u{e0100}', '\u{e01ef}'),Á ];ÁD… # };Á ```Á©üšLI The static storage used by this data structure scales with the number ofÁüçLI contiguous ranges of identifier codepoints in Unicode. Every table entryÁü´LI consumes 8 bytes, because it consists of a pair of 32-bit `char` values.Á©ü…IF In some ranges of the Unicode codepoint space, this is quite a sparseÁüÏKH representation &ndash; there are some ranges where tens of thousands ofÁü›MJ adjacent codepoints are all valid identifier characters. In other places,ÁüéLI the representation is quite inefficient. A characater like `µ` (U+00B5)Áü¶LI which is surrounded by non-identifier codepoints consumes 64 bits in theÁüƒ:7 table, while it would be just 1 bit in a dense bitmap.Á¾©üÂNK On a system with 64-byte cache lines, binary searching the table touches 7Áü‘FC cache lines on average. Each cache line fits only 8 table entries.ÁüØNK Additionally, the branching performed during the binary search is probablyÁü§1. mostly unpredictable to the branch predictor.ÁÙ©üÝMJ Overall, the crate ends up being about 6&times; slower on non-ASCII inputÁü« " compared to the fastest crate.ÁÎ ©üÒ NK A potential improvement would be to pack the table entries more compactly.Áü¡!OL Rust's `char` type is a 21-bit integer padded to 32 bits, which means everyÁüñ!LI table entry is holding 22 bits of wasted space, adding up to 3.9 K. TheyÁü¾"MJ could instead fit every table entry into 6 bytes, leaving out some of theÁüŒ#PM padding, for a 25% improvement in space used. With some cleverness it may beÁüÝ#KH possible to fit in 5 bytes or even 4 bytes by storing a low char and anÁü©$NK extent, instead of low char and high char. I don't expect that performanceÁüø$PM would improve much but this could be the most efficient for space across allÁüÉ%30 the libraries, needing only about 7 K to store.Áý%©Œ& #### ucd-trieÁ“&©ü—&KH Their data structure is a compr
˜¿ÐϺäéù ¢  Š õ5 ¿¿¿ü¨\TÏÏääùù    55ü¾]%üÿ\>; Whether the character has the Unicode property XID\_Start.ÁdÅ]
chÁÒ]üÕ`(ü“`A> Whether the character has the Unicode property XID\_Continue.Á|Ü`
ñxì`T—\<ˆ\$\lˆ\„†\4\
 è  þ 6Õ©Å ¾å ëÉ.4ÖÚÅ å 6RÅ å 
Å ^`Å úó{ ¦ ›ÝLÄ@„ªnÅ ¦ úIÅ ¦ 
Å ^`Å ü“3šò ›ÝLÄ@„ªnãJãüè6È~ãìÀ
ãüå
/
ûò ëÉ.4ÖÚã  #'-148<@EIMQTX\ `dfjnr(vx|€„ˆŒ”˜œ ¦¨2­®²¶º¾ÀCÂÅÑÓÉÙÝáåéíïñóRõ¯©÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ Aãü¯3ûò ëÉ.4ÖÚãˆ
!%*/16:>BGKOQVZ^ bdhlpt(vz~‚†ŠŽ’–šž¢¦«2­°´¸¼¾ÀCÂÈËÃÆÎÑÕ×ÉÛßãçëíÌïñóRõ¯©÷Ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆãü½w+$Ïwšò ›ÝLÄ@„ªnã À>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ??ÿÿÿÿ??ÿªÿÿÿ?ÿÿÿÿÿÿß_ÜÏÿÜ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÃÿP߸@×ÿÿûÿÿÿÿÿÿÿÿÿ¿ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÃÿPÿÿÿÿÿÿÿÿÿÿÿÿÿÿ߸À×ÿÿûÿÿÿÿÿÿÿÿÿ¿ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿþÿÿÿÿ¿¶ÿÿÿ‡ÿÿÿÿÿÀþÿÿÿÿÿÿÿÿÿÿÿ/œýÿÿÿàÿÿÿÿÿÿÿÿÿÿ?üÿÿÿ0ÿÿÿÿÿÿÿÿÿÿÃÿÿÿÿÿÿÿÿÿÿÿÿïŸÿýÿŸÿÿÿÿÿÿÿçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?$ÿÿ?ÿÿÿÿÿÿÿþÿÿÿÿÿðÿÿÿÿÿÿ#ÿþÿáŸùÿÿýÅ#@°ÿÿÿÿÿ?ÿÿÿÿÿÿÿþ€ÿÿÿÿÿÿÿÿÿûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÏÿþÿïŸùÿÿýÅóŸy€°ÏÿPà‡ùÿÿým^à¿ûÿÿýí#àŸùÿÿýí#°èÇ=ÖÇÿî‡ùÿÿýmÓ‡9^Àÿ?î¿ûÿÿýíó¿;ÏÿþîŸùÿÿýíóŸ9à°ÏÿìÇ=ÖÇÿÃÇ=Àÿàßýÿÿýÿ#7áßýÿÿýï#pðßýÿÿÿÿ'@p€üàÿüÿÿû/ÿßýÿÿýÿóß=`7Ïÿïßýÿÿýïóß=`pÏÿÿßýÿÿÿÿÿß}ð€Ïÿüîÿüÿÿû/„_ÿÀÿ þÿÿÿÿÿÖ÷ÿÿ¯ÿ _ðÿþÿÿÿþÿÿÿÿÿÿÿÿÖ÷ÿÿ¯ÿÿ?_ÿóÿ Âÿþÿÿÿþÿßÿÿþÿÿÿ@ÿÿÿÿÿ?<b
ÿÿûÿÿÿÿÀ½ÿ¿ÿÿÿÿÿÿÿÿÿïŸùÿÿýíûŸ9àÏÿKÿÿÿÿ¿ÿ¥÷ÿÿÿÿÿÿÿÿÿÿÿÿ°ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÃÿÿÿÿÿÿÿÿ¿ÿÿÿÿÿÿÿ?ÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿòoÿÿÿÿüÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿòoÿÿÿ¿ùÿÿüÿÿÿÿÿüøÿÿÿÿðÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ#ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿüÿÿÿûÿÿÿÿ@¿ýÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿüÿÿÿüÿÿþûÿÿÿÿ´ÿÿ¿ýÿÿÿûÿÿÿÿÿÿÿÿÿôÿýÿÿÿÿÿÿÿýÿÿÿÿÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿøÿÿàÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿÿøÿÿàÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿùÿÿÿÿÿÿÿÿÿÿÿøÿ |ÿÿÿÿÿÿÿÿÿÿÿùÿÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿ€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïoÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàãøç<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿcÿÿÿàÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿßÿÿÿÿÿÿÿÿßdÞÿëïÿÿÿÿÿÿÿ¿çßßÿÿÿ{_üýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿýÿÿ÷ÿÿÿ÷ÿÿßÿÿÿßÿÿÿÿÿÿÿÿýÿÿÿýÿÿ÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿýÿÿ÷ÿÿÿ÷ÿÿßÿÿÿßÿÿÿÿÿÿÿÿýÿÿÿýÿÿ÷Ïÿÿÿÿÿÿÿÿÿÿÿÿøÿÿÿÿÿ øþÿÿÿÿÿÿÿÿ?ÿÿÿÿÿ€?@ÿÿùÛÿÿÿÿÿÿÿ?ÿÿÿÿÿÿ?ÿCÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿ·?Àoÿÿÿÿÿÿ?Àoÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïÿÿÿ–þ÷