Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Sorting based on existence of keys
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Rasmus Villemoes, post: 4863125"] Actually, I _do_ know some algorithm theory, and I also know that in concrete situations with some upper bound on N an O(N log N) algorithm may be faster than an O(N) algorithm, because of the unmentioned constants hidden in the O-notation. Yes, that was what I thought. I didn't write this, but I know that my data sets will never have more than around 40 elements (most probably even shorter). But I will need to do this lots of times over, so I'm interested in using the method which is fastest for short data sets. Once I get some real data to work with, I will test the different methods you and others have suggested. No, I didn't say it was clearer. The problem with string lengths is non-existent in the real case I'm considering, because, as mentioned, I am really looking at some other properties of $h{$a}. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Sorting based on existence of keys
Top