Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!news2.euro.net!postnews2.euro.net!news.wanadoo.nl!not-for-mail From: mhx@iae.nl (Marcel Hendrix) Subject: Re: well formed flag ? Newsgroups: comp.lang.forth Message-ID: <19761907938435@frunobulax.edu> Date: Sun, 28 Oct 2012 16:59:16 +0200 References: <1538109.deQg0ZcWqx@sunwukong.fritz.box> X-Newsreader: iForth 2.0 console (October 21, 2006) Lines: 37 Organization: Wanadoo NNTP-Posting-Date: 28 Oct 2012 15:59:15 GMT NNTP-Posting-Host: s529d937f.adsl.online.nl X-Trace: 1351439955 dr5.euro.net 236 82.157.147.127:58798 X-Complaints-To: abuse@wanadoo.nl Xref: csiph.com comp.lang.forth:16808 Bernd Paysan writes Re: well formed flag ? > Stephen Pelc wrote: >> The important comparison is the number of hours spent on the >> code generators for C and Forth. > IMHO VFX is limited on x86 by the numbers of registers. As are C > compilers. When I wrote my Wurstkessel cryptography core, Marcel did > compare the C compiler result with iForth on x64, where more registers > are available, and the speed was about the same. I redid these just now on an i7 2.66 GHz machine: 64bits - 0.985 seconds; Speed: 518,743,667 bytes/sec. 32bits - 2.981 seconds; Speed: 171,696,847 bytes/sec. ( rngs_wurst in CODE ) 32bits - 4.741 seconds; Speed: 107,971,320 bytes/sec. ( high-level ) > On x86, Andy Glew (one of the designers of the Pentium Pro) suggested > adding an instruction for "well formed flags" in the Forth sense - which > could be used for bit-wise operations. It got turned down by senior > management, because C compilers couldn't make any benefit from it; > though assembly code would. Rngs_wurst is in CODE because the carry bit is needed. : rngs_wurst ( ud1 index -- ud2 ) 64s ( 8 * ) 'rngs + 64@ 2>R DUP 0< >R D2* R> DUP D- 2R> ROT XOR >R XOR R> ; PRIVATE > Later, in the SSE instruction set, the idea was revived, and indeed > implemented: SSE compares store their result flags as either all bits > set or all bits cleared in the destination register. -marcel