Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: "Hello world" using Hughs novice package Date: Tue, 3 Jan 2017 00:13:54 -0500 Organization: Aioe.org NNTP Server Lines: 49 Message-ID: <20170103001354.68180c0a@_> References: <1myl1w4.mjthkq1ktpoo0N%awegel@arcor.de> <31bfc263-af61-44b7-850d-d366cab82d68@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Newsreader: Claws Mail 3.13.1 (GTK+ 2.24.13; x86_64-unknown-linux-gnu) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:53687 On Tue, 3 Jan 2017 02:00:21 +0100 (CET) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) wrote: > I wonder. There is a straightforward way to optimise ITC quite a bit. ... > Inline everything until [only] code words remain, Yes. Perhaps, a variant of SEE could do this? > then replace by the code itself, Once inlined, you might just convert them from addresses or offsets into assembly subroutine calls. E.g., in Forth, DUP SWAP +! I.e., becomes in x86 assembly, call dup call swap call plus_store The "code words" or "primitives" for dup, swap, or plus_store would remain as assembly routines (or C etc) and simply be called. This should be ITC converted to STC, or something very similar to it. > leaving out the next's, Yes. > replacing branches whith machine code jumps. Yes, but more likely, they'd be converted to absolute branches and conditional branches, unless they don't have sufficient range. > Would anyone be upset? I don't know. There might be issues with converting certain Forth words, such as DOES> or S" which inline data within the threaded code. You'd need to insert branches around the data. Rod Pemberton