Re: RFC 165 (v1) Allow Varibles in tr///
[email protected] ("Stephen P. Potter")
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <[email protected]> |
Lightning flashed, thunder crashed and Bart Lateur <[email protected]> whis pered: | Speedwise, it is. You don't have to do any tests on the bytes. All you | have to do is use the ord of the character (the byte value) as an offset | in a table, and replace what you had with what you find in the table. A | test and conditional jump instruction is a lot slower. Some processors, | like Intel's x86, even have a special machine instruction to do that: | XLAT. Ok, I can understand that. But, what happens when we get to UTF16? Aren't we talking about 256k per tr///, then? That seems like a lot of memory that is potentially wasted and could lead to some really large footprints. -spp