in reply to Re^9: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly

What file? I was talking about using SvPVX to access the bytes of a string of bytes.
  • Comment on Re^10: Interleaving bytes in a string quickly

Replies are listed 'Best First'.
Re^11: Interleaving bytes in a string quickly
by BrowserUk (Patriarch) on Feb 27, 2010 at 00:55 UTC

    And where do the bytes of the string come from?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      You haven't specified. All you said was "I know the data I'd be passing are byte strings", implying you wouldn't be running into any problems because you always pass byte strings. I pointed out that's not true.

      Are you going somewhere with this? If you have something to say, say it. If you have a question to ask, ask it.

        All you said was "I know the data I'd be passing are byte strings", implying you wouldn't be running into any problems because you always pass byte strings. I pointed out that's not true.

        Wrong! I know what data I am dealing with. And I know how I'm going to use it. And I wrote the routine that you took it upn yourself to "correct" to deal with that data. Not your know-it-all flights of fancy.

        You said: It can silently encode your bytes using UTF-8.. And where I'm going with this is trying to get you to realise that you're talking twaddle.

        Data either originates from within my program, or from without. And in either case, Perl will treat it as bytes unless I do something explicit to indicate that it should do otherwise. And since I know I'm not going to do that, I do not have to consider it. It's termed YAGNI.

        That's dealt with your second "correction", so let's deal with the third more succinctly.

        For neither the purposes of the benchmark, nor those of the target application, magic could not be a consideration. Ergo, I did not need to cater for that either. So I didn't. And FYI: magic is never "free".


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.