Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^5: Efficient bit-twiddling in Perl.

by salva (Abbot)
on Mar 01, 2013 at 13:25 UTC ( #1021256=note: print w/replies, xml ) Need Help??

in reply to Re^4: Efficient bit-twiddling in Perl.
in thread Efficient bit-twiddling in Perl.

$ perl /tmp/ Shift&and took: 0.000000844352 seconds Lookup took: 0.000000794679 seconds Lookup2 took: 0.000000945985 seconds (un)pack took: 0.000007257208 seconds

Replies are listed 'Best First'.
Re^6: Efficient bit-twiddling in Perl.
by BrowserUk (Pope) on Mar 01, 2013 at 13:28 UTC

    Less, but still a saving. Thanks. What cpu are you using?

      AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ (IIRC, this is a 2GHz processor)
        (IIRC, this is a 2GHz processor)

        2.1GHz according to the web.

        Perhaps more interesting is that yours has 64KB each of L1 instruction and data cache versus mine's 32KB each. But mine has 4GB of L2 cache versus yours only 512KB L2.

        I've found it impossible to reason about the affects of caching, given the different sizes, n-way associations, and multiple levels. Bad enough with two, but now they are throwing (huge) L3 cahces into the mix as well. Not to mention hyperthreading where 1 hyperthread can utilise the core whilst the other hyperthread is waiting for a cache load.

        In the end, all you can do is measure on the hardware your using and accept that it might work completely differently on another machine. Or even on the same machine with a different mix of competing processes.

        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021256]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-06-21 18:09 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.