[Melbourne-pm] When your variables can't keep their types..

Mathew Robertson mathew.blair.robertson at gmail.com
Sun Jun 5 23:51:24 PDT 2016


Caching doesn't make much sense.

The perlop defines how a value it is used - it shouldn't matter how it is
stored, which (with a few seconds of thought) probably be as a binary
blob.... it is the attribute/tags that define whether it is a pointer,
string as per today

Obviously comparing a 32bit number vs another 32bit number, will be
thousands of cycles faster for an int than a char*.... but given that Perl
isn't the fastest language, so I wouldn't expect that to be a dominating
difference.

... unless "use integer" is in effect.

On 6 June 2016 at 10:39, Andrew Pam <andrew at sericyb.com.au> wrote:

> On 06/06/16 10:35, Simon Taylor wrote:
>
>> I didn't run your sample to see if it behaved the same way here, but it
>> is very counter-intuitive behavior.
>>
>
> One word: caching.
>
> Once you stringify, why repeat the work?  It makes sense once you
> understand the design decision.
>
> Cheers,
>     Andrew
>
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20160606/3f0170c5/attachment.html>


More information about the Melbourne-pm mailing list