Think about Loose Coupling | |
PerlMonks |
Re^3: Bidirectional lookup algorithm? (Judy)by BrowserUk (Patriarch) |
on Jan 14, 2015 at 22:02 UTC ( [id://1113271]=note: print w/replies, xml ) | Need Help?? |
I finally managed to build a 64-bit version of Judy. I started with this one-file/1250 line version and hacked out all the -DSTANDALONE and -DASKITIS stuff along with all the BIG_ENDIAN stuff; extracted a Judy.h; and got the filesize down to 965 lines and built it into a dll:
I then wrote a C program to us it to create two Judy arrays and stored my test data 'aaaaa'..'zzzzz' paired with a 64-bit integer: built it against the dll:
A run:
Then I built it as an Inline::C module, adding method wrappers for the important functions: Unfortunately, in this form, the runtime increase -- mostly I think due to the perl->C->perl transitions -- from 6.5 seconds to over 25s:
So, whilst it does use somewhat less memory than my BiMap version; is also somewhat slower. 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. Agile (and TDD) debunked
In Section
Seekers of Perl Wisdom
|
|