Hypothetical: Making a word game and needing to check word..
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Hypothetical: Making a word game and needing to check wo
Of course. But I thought the goal was to avoid loading everything into memory?
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Hypothetical: Making a word game and needing to check wo
Even loading the full 228,000 words, and if each word took up 10 bytes, it would be 2 MB RAM used. Not enough to write a swapping mechanism for these days, I reckon.Taehl wrote:Of course. But I thought the goal was to avoid loading everything into memory?
Help us help you: attach a .love.
Re: Hypothetical: Making a word game and needing to check wo
In the same vain you shouldn't worry about runtime so much. For 250000 entries a hash will work just fine, even if there are collisions. Only when the number of words gets really big (and I mean really big, as in Google's search engine, or the wordnet database) you should invest your time in sophisticated data-structures and algorithms.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Hypothetical: Making a word game and needing to check wo
I have an English regex dictionary that I wrote, and here's the word library, maybe this helps.
I don't remember where I got this
I don't remember where I got this
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Who is online
Users browsing this forum: Bing [Bot] and 6 guests