Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Re: Re: Fast wordlist lookup for game

by BrowserUk (Patriarch)
on Oct 30, 2002 at 22:29 UTC ( [id://209266]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Fast wordlist lookup for game
in thread Fast wordlist lookup for game

With a couple of changes to my program, I ran it on the output of perldoc perltoot and got the following results:

C:\test>208899-2 junk.dat Of 10479 word-like things, 7803 where flagged as words and 2676 as not 10479 trials of _default (58.184s total), 5.552ms/trial

Which if my ad-hoc conversion factor of *233/800 has any merit puts it at 1.61702ms/word which stands up pretty well given the that it has to re-open the file each time.

Not having used any of the *dbm varients, I was impressed by the efficiency and simplicity of use that your program demonstrated, and when I looked, found that dada's site has a Win32 port of GDBM which I am in the process of downloading now.

Thanks greatly for bringing this to my attention. There are many things for which I think I will find this extrememly useful.


Nah! Your thinking of Simon Templar, originally played by Roger Moore and later by Ian Ogilvy

Replies are listed 'Best First'.
Re*6: Fast wordlist lookup for game
by grantm (Parson) on Oct 30, 2002 at 23:29 UTC

    Further thoughts:

    • I suspect there's not too much merit in your *233/800 factor - those numbers are just raw processor Mhz numbers, many cycles will be wasted waiting for main memory and man, many more if disk IO is required.
    • You could also use DB_File which is available via PPM from ActiveState and I believe uses the same API
    • SDBM_File is a core perl module which also uses the same API, but has significant limitations on allowable size of data
    • See also MLDBM which allows you to store complex data structures in a DBM hash

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://209266]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found