in reply to Re^23: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly
Cheap theatrics. Cos now int i = -1; uint j = i; it does.
I never said or implied that the types are equivalent. Different types have different range, precision and costs.
32/64-bit strings have a wider range, but they are more costly in every respect. (That's why we have 8-bit strings at all.) The range of 32/64-bit strings encompasses the range of 8-bit strings, so your signed vs unsigned analogy is broken.
Nope! I meant exactly what I said.
If you meant what you said, you haven't ruled out doing something like $pascal_bytes = chr(length($bytes)) . $bytes;. For long enough strings, it upgrades without calling upgrade and without Perl assigning any meaning to the string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^25: Interleaving bytes in a string quickly
by BrowserUk (Patriarch) on Mar 01, 2010 at 14:59 UTC | |
by ikegami (Patriarch) on Mar 01, 2010 at 15:13 UTC | |
by BrowserUk (Patriarch) on Mar 01, 2010 at 16:20 UTC | |
by ikegami (Patriarch) on Mar 01, 2010 at 17:14 UTC | |
by BrowserUk (Patriarch) on Mar 01, 2010 at 17:23 UTC | |
| |
|
Re^25: Interleaving bytes in a string quickly
by BrowserUk (Patriarch) on Mar 01, 2010 at 16:43 UTC |