Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.forth > #23823
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: OT (slightly) What is the "best" processor for a new project? |
| Date | 2013-06-20 12:51 +0200 |
| Organization | 1&1 Internet AG |
| Message-ID | <kpumru$pm2$1@online.de> (permalink) |
| References | (1 earlier) <kpmurr$7m2$1@online.de> <16341816-2ac4-4e08-bc85-002e2c6600bf@o10g2000yqo.googlegroups.com> <kpqifm$ps1$2@dont-email.me> <kpsbuj$qbe$1@online.de> <170e58ea-f4c1-42c9-be67-985b4aafa2ec@n5g2000yqa.googlegroups.com> |
Hugh Aguilar wrote: > You need one or two thousand primitives for any serious application. In the programming style you used... which is having a CPU where even a 16 by 16 addition is fairly complicated, but threaded code interpretation is helped with by parallel execution. That's not what I do. >> Hugh should actually check the numbers. Call/return pairs are not >> happening that often, even in my well-factored b16 programs. > > I've read Anton Ertl say that speeding up Gforth mostly involved > boosting the number of primitives, and making primitives execute > faster --- so he seems to be doing the same thing in software that was > done in hardware with the MiniForth. Yes, Gforth is a threaded code system, and the three things to make Gforth fast are: Have many primitives (but there are still less than 400), have some static super-instructions (like literal + combined), and have dynamic superinstructions - the latter is some sort of "poor man's native code compiler", and much better than having lots of static superinstructions, though the static superinstructions are by themselves "better" than the dynamic. A number of primitives in Gforth are just bindings to some C functions, and we might better use the C interface for that. If you want even more speed, you go to real native code (analytic) compiler, and then, the number of primitives you need will go down. Stephen Pelc sais that since they use VFX, they have written much less assembler than before. An analytic compiler needs primitives only for those words that map to the instructions of the underlying CPU. > The assembly language was very low-level --- it was what most people > would call "micro-code." For example, the 16 by 16 addition was a > fairly complicated primitive --- it was complicated enough that I > didn't write it myself, but let my coworker write it. Yes, but on the b16, a 16 by 16 addition is just one single-cycle opcode, nothing complicated (also not on the hardware level, an adder is not complicated). A 16 by 16 multiplication or 32/16 division needs a number of multiplication or division steps, and, if signed, some extra code to adjust the signs. In the end, we have a file called "b16-prim.fs", which has words in it that are primitives in normal Forths, but macros or small colon definitions on the b16. A 32 bit addition e.g. is macro: d+ ( d1 d2 - d3 ) >r swap >r + r> r> +c end-macro (or if you like to save space, make it a colon definition, this one is 3x16 bit words plus one additional 5 bit opcode). -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Re: OT (slightly) What is the "best" processor for a new project? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-16 23:17 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-17 14:19 +0200
Re: OT (slightly) What is the "best" processor for a new project? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-17 16:04 -0700
Re: OT (slightly) What is the "best" processor for a new project? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-17 16:15 -0700
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-18 00:01 -0400
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-19 15:33 +0200
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-19 17:25 -0400
Re: OT (slightly) What is the "best" processor for a new project? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-19 17:00 -0700
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-20 18:35 -0400
Re: OT (slightly) What is the "best" processor for a new project? Hugh Aguilar <hughaguilar96@yahoo.com> - 2013-06-19 17:38 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-20 12:51 +0200
Re: OT (slightly) What is the "best" processor for a new project? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-20 15:28 +0000
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-20 18:39 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-21 14:50 +0200
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-22 18:56 -0700
Re: OT (slightly) What is the "best" processor for a new project? "WJ" <w_a_x_man@yahoo.com> - 2013-06-23 02:35 +0000
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-22 20:48 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-23 14:49 +0200
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-26 18:08 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-27 16:32 +0200
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-30 10:10 -0700
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-30 15:18 -0400
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-30 16:01 -0700
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-30 20:22 -0400
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-30 21:22 +0200
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-30 15:52 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-01 02:02 +0200
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-06-30 19:25 -0700
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-01 02:34 -0500
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-07-01 16:26 -0400
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-01 23:08 +0200
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-07-01 18:10 -0400
Re: OT (slightly) What is the "best" processor for a new project? "Elizabeth D. Rather" <erather@forth.com> - 2013-07-01 12:35 -1000
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-07-01 18:42 -0400
Re: OT (slightly) What is the "best" processor for a new project? "Elizabeth D. Rather" <erather@forth.com> - 2013-07-01 13:03 -1000
Re: OT (slightly) What is the "best" processor for a new project? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-02 07:20 +0000
Re: OT (slightly) What is the "best" processor for a new project? "Elizabeth D. Rather" <erather@forth.com> - 2013-07-02 07:38 -1000
Re: OT (slightly) What is the "best" processor for a new project? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-02 07:24 +0000
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-02 13:02 +0200
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-02 05:58 -0400
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-02 03:34 -0500
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-07-01 20:01 -0700
Re: OT (slightly) What is the "best" processor for a new project? "WJ" <w_a_x_man@yahoo.com> - 2013-07-02 04:43 +0000
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-02 03:41 -0500
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-02 06:09 -0400
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-07-02 13:51 -0700
Re: OT (slightly) What is the "best" processor for a new project? daveyrotten <danw8804@gmail.com> - 2013-07-02 14:37 -0700
Re: OT (slightly) What is the "best" processor for a new project? daveyrotten <danw8804@gmail.com> - 2013-07-02 14:56 -0700
Re: OT (slightly) What is the "best" processor for a new project? Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-03 00:30 +0200
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-03 02:19 -0500
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-03 05:18 -0400
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-07-03 18:10 -0700
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-03 05:30 -0400
Static superinstructions(was: OT (slightly) What is the "best" ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-07-03 14:33 +0000
Re: Static superinstructions(was: OT (slightly) What is the "best" ...) Bernd Paysan <bernd.paysan@gmx.de> - 2013-07-04 00:41 +0200
Re: Static superinstructions(was: OT (slightly) What is the "best" ...) "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-07 11:32 -0400
Re: OT (slightly) What is the "best" processor for a new project? hughaguilar96@yahoo.com - 2013-07-03 18:31 -0700
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-07 11:28 -0400
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-07-02 16:44 -0400
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-02 05:56 -0400
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-02 05:58 -0500
Re: OT (slightly) What is the "best" processor for a new project? "Rod Pemberton" <do_not_have@notemailnotq.cpm> - 2013-07-03 05:57 -0400
Re: OT (slightly) What is the "best" processor for a new project? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-07-03 06:43 -0500
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-30 20:29 -0400
Re: OT (slightly) What is the "best" processor for a new project? rickman <gnuarm@gmail.com> - 2013-06-27 10:58 -0400
csiph-web