Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: Best method to diff very large array efficiently

by BrowserUk (Pope)
on Nov 26, 2013 at 20:00 UTC ( #1064461=note: print w/replies, xml ) Need Help??


in reply to Re^4: Best method to diff very large array efficiently
in thread Best method to diff very large array efficiently

I avoided allocating useless arrays for the result

Your benchmark is completely unrealistic, chalk & cheese comparison, and thus totally broken.

  1. keys & values used in void context:>

    From perlfunc:

    • "In particular, calling keys() in void context resets the iterator with no other overhead."
    • "(In particular, calling values() in void context resets the iterator with no other overhead.)"
  2. Whilst grep in a void context probably avoid generating the return list; it doesn't stop it from iterating the entire input list.

Benchmark code that doesn't actually produce the required result is broken. And broken, is just broken; of no value at all.

Obviously vec scales badly the sparser the distribution of values become...

Think again.


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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064461]
help
Chatterbox?
[thezip]: It fails in the "formatted 2-digit numeric" tests
[thezip]: Okay Corion, that's what I wanted to hear. Thanks!
[Corion]: Oh, a test failure... Just force-install it then? --force and potentially --notest to skip the tests alltogether ?
[ambrus]: thezip: is Activestate Perl usable for your scenario instead?
[MidLifeXis]: Yeah, --notest is good, not sure I would do --force.
[thezip]: It fails 2/10 tests in that group. What are the ramifications if I force it? What should I look for for?
[thezip]: I've migrated from ActiveState to Strawberry. No going back...
[thezip]: I'll try the --notest arg first when I get back from meetings (after lunch).
[thezip]: Thanks guys for your comments! :-)
[1nickt]: Quick survey: has anyone used or even heard of autobox?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2017-03-23 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (290 votes). Check out past polls.