in reply to Re: Unpacking and converting
in thread Unpacking and converting

Your code above never does anything

Oopsie, thanks for pointing out this braino. I ran my benchmarks against working code, you can be sure of that. :)

Considering array processing, well I'm not a perl guru so I can only guess; and my guess is that in perl, arrays are not really arrays internally but linked lists with external indices. That would at least explain why shifting and tossing is so blazing fast - there's very little expense in following a pointer, after all - but it cannot explain why index lookup is so shocking slow. And why for (@list) is 60% faster than index lookup but otherwise slow is beyond me. This was exactly the reason I asked my question, since my first impression was that I'm doing something wrong but couldn't pinpoint what exactly.

Regards,
Alex.