Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #10921
| From | John Passaniti <john.passaniti@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Lego Mindstorms |
| Date | 2012-04-05 07:28 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <e2c0119d-e7bb-41dd-9569-1392f5ba9797@l14g2000vbe.googlegroups.com> (permalink) |
| References | (6 earlier) <jldd6v$v1s$1@online.de> <44be62fc-61c3-4d8c-a2af-fa82f8aeb609@l30g2000yqb.googlegroups.com> <jlfkpp$1o9$1@online.de> <87058dc4-53ee-432f-a40f-a49ed8e1f903@n5g2000vbf.googlegroups.com> <aac8de9b-8ada-424e-bc95-ffb4ad52e980@v22g2000yqm.googlegroups.com> |
On Apr 5, 4:07 am, Hugh Aguilar <hughaguila...@yahoo.com> wrote: > Symtab is available here: http://www.forth.org/novice.html Thanks. I like the introductory paragraph on that page which has the following errors: > If you have a lot of memory (modern desktop > computers do), then a hash table is a better > choice. Nope. As shown in prior conversation, a hash table is equally effective on a system without a lot of memory. Your problem is that despite having the Internet at your fingers, you persist in believing that the only implementation possible for a hash table is one that consumes more memory than "symtab." This has been shown wrong in past conversation. There are many different ways one can implement hashes and despite being told this repeatedly, you appear to believe there is only one way. > Given limited memory, such as for an MS-DOS > computer (one 64K segment for the headers), > then symtab is the best choice. This claim of being the "best choice" is an undemonstrated claim. Please instrument your code to track both memory use and access time. I will then prove your claim is false with a variety of existing algorithms that out-perform "symtab". > Symtab assumes that there is a lot of variance > in how often the nodes are accessed, which is > typical for a symbol table. Yes, this is true-- some symbols are used more frequently than others. However, the essential detail you (and your "invention") miss is that a stronger property isn't just frequency, but temporality of access. Locality of reference is what one would want to exploit in a symbol table over mere frequency, and which also happens to result in simpler algorithms that perform better, with less memory, and less CPU. In fact, I had shown that a simple traditional linked list with MRU behavior would usually outperform "symtab" on both memory and CPU because it exploits the stronger property of locality of reference. Call me crazy, but in general, Forth programmers value simplicity and efficiency. "symtab" provides neither over competitive algorithms. > If all the nodes are roughly equal in popularity, > which is typical for an associative array, then > ASSOCIATION.4TH would be a better choice. This is nonsensical. A traditional hash-based associative array tends towards O(1) performance regardless of the frequency of access. You can access a symbol once or a billion times, and the cost of access will be constant.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Lego Mindstorms Mentifex <mentifex@myuw.net> - 2012-03-27 15:30 -0700
Re: Lego Mindstorms dirk.bruehl@usa.net - 2012-03-27 22:52 -0700
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-28 04:13 -0700
Re: Lego Mindstorms Jason Damisch <jasondamisch@yahoo.com> - 2012-03-28 09:20 -0700
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-03-28 17:17 -0700
Re: Lego Mindstorms Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-03 01:37 +0200
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-03 04:24 -0700
Re: Lego Mindstorms Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-03 21:58 +0200
Re: Lego Mindstorms John Passaniti <john.passaniti@gmail.com> - 2012-04-04 14:04 -0700
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-05 01:07 -0700
Re: Lego Mindstorms John Passaniti <john.passaniti@gmail.com> - 2012-04-05 07:28 -0700
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-06 00:01 -0700
Re: Lego Mindstorms John Passaniti <john.passaniti@gmail.com> - 2012-04-06 19:32 -0700
Re: Lego Mindstorms awegel@arcor.de (Alex Wegel) - 2012-04-03 22:28 +0200
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-04 01:25 -0700
Re: Lego Mindstorms awegel@arcor.de (Alex Wegel) - 2012-04-06 17:47 +0200
Re: Lego Mindstorms Mark Wills <markrobertwills@yahoo.co.uk> - 2012-04-05 02:12 -0700
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-05 07:23 -0700
Re: Lego Mindstorms "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-04-06 07:19 -0400
Re: Lego Mindstorms Mark Wills <markrobertwills@yahoo.co.uk> - 2012-04-06 07:52 -0700
Re: Lego Mindstorms BruceMcF <agila61@netscape.net> - 2012-04-06 10:21 -0700
Re: Lego Mindstorms "Harry Vaderchi" <admin@127.0.0.1> - 2012-04-10 14:21 +0100
Re: Lego Mindstorms Alex McDonald <blog@rivadpm.com> - 2012-04-10 09:23 -0700
Re: Lego Mindstorms "Elizabeth D. Rather" <erather@forth.com> - 2012-04-06 08:22 -1000
Re: Lego Mindstorms Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-04-09 19:20 -0700
Re: Lego Mindstorms hwfwguy@gmail.com - 2012-04-06 15:30 -0700
Re: Lego Mindstorms Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-03 00:46 +0200
csiph-web