Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.theremailer.net!frell.theremailer.net!anonymous From: Fritz Wuehler Comments: This message did not originate from the Sender address above. It was remailed automatically by anonymizing remailer software. Please report problems or inappropriate use to the remailer administrator at . Identifying the real sender is technically impossible. Newsgroups: comp.lang.forth Subject: Re: How about helping optimization in language? References: <7xbon1bia5.fsf@ruckus.brouhaha.com> Message-ID: <6679f60ae5400a6846bdb5904a07ade7@msgid.frell.theremailer.net> Precedence: anon Date: Mon, 09 Apr 2012 23:33:00 +0200 Mail-To-News-Contact: abuse@frell.theremailer.net Organization: Frell Anonymous Remailer Xref: csiph.com comp.lang.forth:11058 Paul Rubin wrote: > Example (from way back): Moore's Forths traditionally implements their > dictionaies as linked lists of words rather than than with fancier but > more efficient structures like hash tables. and that is probably fine until you have such a large dictionary that a more direct form of reference (hashing) is a win overall from searching a short, ordered list. good hashing is hard to do and then you have to deal with collisions if you don't use a good hash or consume a lot of storage to map a sparse data in a huge area. Balanced trees would be a lot smarter than hashing or linked lists at some point, the question is where does it begin to pay off? > Another example (from other recent thread): multitasking Forth > traditionally uses a round robin scheduler, so if there are N tasks > waiting on pending timeouts, how does it know which task to wake up first? Round robin scheduling isn't such a great idea for multitasking. Forth didn't invent that, and I would say implementations that use it are nothing to use as a reference anyway. Unless you have some control over priority you can cause yourself other problems > GHC recently replaced a linear > scan with an O(log n) priority search structure for this, and got a big > speedup when n is large. Do any Forths do that? For searching the dictionary or selecting a task? Do you have so many thousands of tasks you need to search a priority structure to dispatch? If you really were talking about selecting a task this isn't round robin and is an entirely different mechanism, so there isn't any basis for comparison. And what does this have to do with Forth? It's an implementation detail, I don't see what it has to do with the language.