let's couch this in terms of microprocessors that can run Forth well
on Linux... are newer models using cores & kludges to gain
performance ... ?
Buzz McCool <buzz_mccool@yahoo.com> writes:
let's couch this in terms of microprocessors that can run Forth well
on Linux... are newer models using cores & kludges to gain
performance ... ?
Users mostly care about performances more than about architectural >brilliance, and so if a vendor can gain performance by adding cores and >kludges, they have strong incentive to do so regardless of how much
elegance they started with. And elegant architectures for Forth are
probably not well suited for Linux and vice versa. Succesful Linux
CPU's have quite a lot of registers and while fancy Forth compilers can
make use of them, you end up with an abstraction inversion, simulating a >stack machine that way.
You might like the TI MSP430 which is a 16-bit MCU line inspired by the >PDP-11. It can't run Linux and it's now mostly eclipsed by ARM Cortex-M
and maybe soon Risc-V MCU's, but its CISC-style addressing modes are >convenient for Forth, and its hardware implementations have some neat >features like built in non-volatile (ferromagnetic) RAM in some models.
Users mostly care about performances more than about architectural brilliance, and so if a vendor can gain performance by adding cores and kludges, they have strong incentive to do so regardless of how much
elegance they started with. ...
Is there a particular CPU that shines in overall architectural elegance?
Which microprocessor is closest to getting it all right? Is it just a
matter of buying the latest available from ARM / Intel / AMD or are
newer models using cores & kludges to gain performance whereas a system based >on a 4.4Ghz Intel Pentium Gold 8505 is really the choice for someone who wants >a brilliantly executed machine?
Succesful Linux
CPU's have quite a lot of registers and while fancy Forth compilers can
make use of them, you end up with an abstraction inversion
The Pentium 8505 is an Alder Lake U with half of it's P-cores and halfThanks Anton. May I ask if you have a particular CPU that you find
of its E-Cores disabled, and some of the cache, leaving 1 P-Core and 4 E-cores. If you want the best performance, there are certainly a
number of microarchitectures by AMD, Apple, ARM, Intel, and Qualcomm
that compete for that spot and show fascinating feats in clock rate
and instructions per cycle (IPC), and the cores in the Pentium 8505
are not far behind; newer microarchitectures are better. If you want something small, maybe look for the ARM Cortex M0 or one of the small
RISC-V cores.
You might like the TI MSP430 which is a 16-bit MCU line inspired by the PDP-11. It can't run Linux and it's now mostly eclipsed by ARM Cortex-M
and maybe soon Risc-V MCU's, but its CISC-style addressing modes are convenient for Forth, and its hardware implementations have some neat features like built in non-volatile (ferromagnetic) RAM in some models.
Paul Rubin <no.email@nospam.invalid> writes:
Succesful Linux
CPU's have quite a lot of registers and while fancy Forth compilers can >>make use of them, you end up with an abstraction inversion
That's what you have claimed repeatedly. That would be true if the >programmers actually wanted a register machine and simulated that in
some way with the stack. That's not what is happening. The stack is
a good abstraction for passing operands and parameters. That's why it
is used in Forth, in the JavaVM, in WebAssembly, and elsewhere. The
stack is not a good abstraction for dealing with lots of values,
that's why Forth has locals, the Java VM has local variables, and
WebAssembly has locals.
- anton
On 12/2/25 12:25 AM, Paul Rubin wrote:
You might like the TI MSP430 which is a 16-bit MCU line inspired by the
PDP-11. It can't run Linux and it's now mostly eclipsed by ARM Cortex-M
and maybe soon Risc-V MCU's, but its CISC-style addressing modes are
convenient for Forth, and its hardware implementations have some neat
features like built in non-volatile (ferromagnetic) RAM in some models.
I ported eForth to an FRAM MSP430:
http://davesrocketworks.com/electronics/msp430/eforth/index.html
Having fiddled with ARM (an eForth for that too) I can safely say that
the MSP430 is better for low power applications. You can put an ARM into >something resembling a low power mode but it takes forever to start up
again. At least in comparison to the MSP430.
David Schultz
Thanks Anton. May I ask if you have a particular CPU that you find >pleasurable to use in your daily work?
On 12/2/25 12:25 AM, Paul Rubin wrote:
You might like the TI MSP430 which is a 16-bit MCU line inspired by the
PDP-11. It can't run Linux and it's now mostly eclipsed by ARM Cortex-M
and maybe soon Risc-V MCU's, but its CISC-style addressing modes are
convenient for Forth, and its hardware implementations have some neat
features like built in non-volatile (ferromagnetic) RAM in some models.
I ported eForth to an FRAM MSP430:
http://davesrocketworks.com/electronics/msp430/eforth/index.html
Having fiddled with ARM (an eForth for that too) I can safely say that
the MSP430 is better for low power applications. You can put an ARM into something resembling a low power mode but it takes forever to start up again. At least in comparison to the MSP430.
Buzz McCool <buzz_mccool@yahoo.com> writes:
Thanks Anton. May I ask if you have a particular CPU that you find >>pleasurable to use in your daily work?
AMD64 implementations by AMD and Intel are fast and run the OS of my
choice (GNU/Linux), which cannot be said of ARM A64 or RISC-V
implementations (either much slower or lack GNU/Linux support).
- anton
In article <2025Dec3.154202@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
AMD64 implementations by AMD and Intel are fast and run the OS of my
choice (GNU/Linux), which cannot be said of ARM A64 or RISC-V >>implementations (either much slower or lack GNU/Linux support).
This is changing fast. I have the Orange pi RV2 , (riscv)
and it has a 8 core over 1 Ghz CPU, and run several brands of GNU Linux,
e.g.
Welcome to Orange Pi 1.0.0 Noble with Linux 6.6.63-ky
It doesnot compare in speed to my 25 Kg HP workstation, but fits in the
palm of you hand
sieve bubble matrix fib fft release; CPU; gcc
0.020 0.021 0.012 0.027 0.015 20250115; AMD Ryzen 8700G 5000MHz; gcc-12.2.0 0.027 0.033 0.011 0.043 0.017 20250115; Golden Cove 3.8GHz (Core i3-1315U); gcc-10.2.1
On 12/4/2025 9:26 AM, Anton Ertl wrote:
sieve bubble matrix fib fft release; CPU; gcc
0.020 0.021 0.012 0.027 0.015 20250115; AMD Ryzen 8700G 5000MHz; gcc-12.2.0 >> 0.027 0.033 0.011 0.043 0.017 20250115; Golden Cove 3.8GHz (Core i3-1315U); gcc-10.2.1
In comparing these two CPUs, it appears to me that single thread performance is the
key factor.
These are single-thread benchmarks, so of course single-thread
performance is the key factor for performing well on them.
So in my case an elegant CPU might boil down to something high on
this list with a low price tag.
https://www.cpubenchmark.net/single-thread/
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,089 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 153:55:13 |
| Calls: | 13,921 |
| Calls today: | 2 |
| Files: | 187,021 |
| D/L today: |
3,761 files (945M bytes) |
| Messages: | 2,457,163 |